Programming of MC68HC908MR32

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Programming of MC68HC908MR32

2,709 Views
Camillos
Contributor I
Hi,
I tried to program the HC908MR32 through a Monitor ROM. I made a connection according to the processors' datasheet (buffer and level-shifter for connection with ordinary PC), it works, but there's a one problem:
What's the secutiry code (8 security bytes) for a new chip?
 
I tried 8 times 0xFF, but it didn't work (processor should return 10 consecutive 0x00). There is described some way in the datasheet, how to erase security bytes, but it needs to download some program into RAM, what I don't know how to make without previous communication with the processor.
 
Doesn't somebody have some experiencies with programming Motorola in this mode?
 
 
Thanks a lot
 
Kamil
Labels (1)
0 Kudos
Reply
2 Replies

478 Views
peg
Senior Contributor IV

Hi Kamil,

What software are you using to "drive" your MON08 adapter?

Sounds like you are doing everything yourself.

The security code for a blank device is 8 erased values which is $FF.

If you are not sure you can ignore security then you can "mass erase" by loading some code into RAM and executing it This will get you back to a known point in order to start again using security code for "blank".

If not already doing so perhaps you should try the free software at www.pemicro.com

Regards David

 

Message Edited by peg on 2006-07-15 10:22 AM

0 Kudos
Reply

478 Views
rhinoceroshead
Contributor I
There are many ways to get connected, but you should be able to talk to the chip *every time*, regardless of the security bytes if you use high voltage (7.5-8 volts) on the reset pin - using the free version of CodeWarrior (which encapsulates the P&E Microsystems programming software that Peg is linking).  Everything you need to do in hardware is outlined on pages 257 and 258 of the datasheet.  You can forget about all the data formats and MON08 commands outlined there because the P&E programming software does all of that for you.
 
You lose access to several pins while debugging when doing it this way (the Forced Monitor Mode), but if you just want to see that it works, and want to get up and running as quickly as possible without buying a programmer, I would recommend doing it this way for starters.
 
The 8 security bytes happen to overlap with the last 4 interrupt vectors (not counting reset), so if you have programmed the device before but don't know the security bytes, you can recover the security bytes by looking at the project map file in CodeWarrior to find out the addresses of your ISRs.  If you weren't using any interrupts the last time you programmed the chip, the security bytes will all be $FF.  If you only used the IRQ interrupt, and the IRQ ISR is located at $E000, then the 8 security bytes will be FF FF FF FF E0 00 FF FF.
 
If you are developing something that you don't want anyone to gain access to, then you would program these last 4 interrupt vectors even if they aren't being used - just to make the security harder to crack by brute force.
0 Kudos
Reply