How to make the feature "EEPROM Read Protection in Monitor Mode" work?

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

How to make the feature "EEPROM Read Protection in Monitor Mode" work?

2,203 Views
admin
Specialist II

Hi,

 

I develop my program on the MC68HC908AZ32A, there is a bit in the Configuration Register CONFIG-2, below is this bit's description:

 

EEMONSEC — EEPROM Read Protection in Monitor Mode Bit
When EEMONSEC is set the entire EEPROM array cannot be accessed in monitor mode unless a valid security code is entered.
1 = EEPROM read protection in monitor mode enabled
0 = EEPROM read protection in monitor mode disabled

 

Is the "valid security code" just the eight security byte which is used to enter Monitor mode?

 

I once used P&E to enter the monitor mode but sent a wrong eight security byte (we still can enter monitor mode because P&E can help us "IGNORE security failure and enter monitor mode"), but I still can read EEPROM even I have set EEMONSEC bit in my powerup initializaion routine (this bit's default value of reset should also be 1), how can I setup my test to verify the function of the bit EEMONSEC?

 

Thanks,

Simon



Message Edited by Simon Zhu on 2007-12-21 02:45 AM
Labels (1)
0 Kudos
2 Replies

704 Views
Ake
Contributor II
Hi,
On the HC908AZ32A, there is a EEMONSEC bit in the CONFIG2 register, that is normally set.
This means that you must enter the security bytes in order to be able to read/erase/write the EEPROM memory.
Yes the security bytes is the same as for the Flash EPROM.
 
If you change this bit value in User mode, doesn't make any difference. The EEPROM is always accessible in User mode.
 
If you cannot remember the correct security code, you can always enter anything and then erase the Flash EPROM and start again. This will set the security bytes to 0xff...0xff.
 
BUT if you have programmed something to the EEACR register, you can never see or change that back again. This will protect the EEPROM forever. See 5.6.2 in MC68HC908AZ32A.
 
Regards,
Ake
0 Kudos

704 Views
admin
Specialist II
Hi Ake,
 
Thanks for your help, but I still don't quite understand.
 
There's some information in the P&E's help document as below:
You can erase the device. Run the PROG08SZ application, and when the above box appears, select the "IGNORE security failure…" option and click OK. Use the Choose Module command to select the appropriate programming algorithm, and select Erase Module. This should erase the device. You will have to execute the Choose Module command again before you can access the blank device.  Note: on some older revisions of silicon, you can't ignore the security failure, and it will bring this box back up every time you click OK(Retry). If this is the case, you should obtain the latest silicon revision from Motorola.
 
The above notes match your explanation that "If you cannot remember the correct security code, you can always enter anything and then erase the Flash EPROM and start again. This will set the security bytes to 0xff...0xff."
 
But the problem is that I have set the EEMONSEC bit, and I enter the Monitor Mode by select "IGNORE security failure", but before I erase the module to make the security bytes to be oxFF.. 0xFF, I still can read the EEPROM which seems that the EEMONSEC bit doesn't take effect.
 
Thanks,
Simon
0 Kudos