EEPROM protection issue- MC9S12XD512

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

EEPROM protection issue- MC9S12XD512

Jump to solution
3,365 Views
maatweeb
Contributor II

Bear with me, as I am just an EE.

 

We are using a MC9S12XD512.

 

During a SW VNV effort, our contractor somehow protected the EEPROM so we can no longer erase/write.

 

From the datasheet:

To change the EEPROM protection that will be loaded during the reset sequence, the EEPROM memory

must be unprotected, then the EEPROM Protection byte must be reprogrammed.

 

It also says:

The EPOPEN and EPDIS bits can only be written to the protected state.

 

Currently we have:

EEPROM Protection Byte at address 0x13FFFD = 0x00

EPROT at address 0x114 = 0x00

 

Both should be 0xFF.  How do I change this? 

 

Thanks,

Matt

 

 

Added p/n to subject.

Message Edited by NLFSJ on 2009-04-16 09:18 AM
Labels (1)
0 Kudos
Reply
1 Solution
1,166 Views
maatweeb
Contributor II

Our problem was solved by switching debuggers.  Using the Codewarrior debugger instead of Zap made the difference.

 

Matt

View solution in original post

0 Kudos
Reply
4 Replies
1,166 Views
maatweeb
Contributor II

Some additional data. 

 

At start up the EPROT register is 0x00.  Also, the EEPROM protection byte is 0x00.  ESTAT is 0xC0.  I can rewrite EPROT to 0xFF.  Then when I try to write to the EEPROM protection byte, ESTAT becomes 0xD0, and the EEPROM protection byte does not change.

 

Perhaps the EEPROM is permanently protected?  The datasheet is unclear, unless I am missing something.

0 Kudos
Reply
1,166 Views
kef
Specialist I
If EEPROM/FLASH protection byte is programmed to protected state, then you can't unrpotect EEPROM/FLASH in normal mode. You should reset to special mode using BDM pod. Also chip has to be not secured. If it is secured then you can't unprotect without full chip erase.
0 Kudos
Reply
1,166 Views
maatweeb
Contributor II

Hello,

 

I have tried the complete memory erase sequence, but have been unsuccessful. 

When I write the mass erase command (0x41) into the ECMD register, the ACCERR bit in the ESTAT register goes to "1".

 

I have verified that I am resetting in to special single chip mode, and that the chip is unsecured.

 

Any other guidance would be much appreciated.

Thanks.

0 Kudos
Reply
1,167 Views
maatweeb
Contributor II

Our problem was solved by switching debuggers.  Using the Codewarrior debugger instead of Zap made the difference.

 

Matt

0 Kudos
Reply