EEPROM protection issue- MC9S12XD512

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

EEPROM protection issue- MC9S12XD512

跳至解决方案
3,369 次查看
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
标签 (1)
0 项奖励
回复
1 解答
1,170 次查看
maatweeb
Contributor II

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

 

Matt

在原帖中查看解决方案

0 项奖励
回复
4 回复数
1,170 次查看
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 项奖励
回复
1,170 次查看
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 项奖励
回复
1,170 次查看
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 项奖励
回复
1,171 次查看
maatweeb
Contributor II

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

 

Matt

0 项奖励
回复