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.
Solved! Go to Solution.
Our problem was solved by switching debuggers. Using the Codewarrior debugger instead of Zap made the difference.
Matt
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.
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.
Our problem was solved by switching debuggers. Using the Codewarrior debugger instead of Zap made the difference.
Matt