mm9z1-638:about EEPROM ECC question

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

mm9z1-638:about EEPROM ECC question

跳至解决方案
992 次查看
gumu
Contributor IV

Dear Sir,

Our project uses mm9z1-638 with CPU S12z. I would like to ask, if an EEPROM ECC error occurs at a certain address, and we want to try to recover it, should we erase the 4-byte aligned address after that address, for example, addresses 0x100300, 0x100301, 0x100302, 0x100303. As per the manual, the EEPROM operates in sections of 4 bytes each. So, if an ECC error occurs at 0x100302 and 0x100303, I need to erase these 4 bytes: 0x100300, 0x100301, 0x100302, 0x100303. Is my understanding correct?

Thanks!

标记 (1)
0 项奖励
1 解答
941 次查看
lama
NXP TechSupport
NXP TechSupport

Hi,

Of course, it can happen. The data sheet states…” Each uncorrectable memory corruption, which is detected during a S12ZCPU, ADC or PTU access triggers a machine exception.” … and double bit ECC error in uncorrectable memory corruption.
https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12Z-machine-exception-caused-by-ECC-issue-...
Note; as a fist step I would analyze why this ECC happened. Are you sure you do not use cumulative programming? This is the most frequently appearing issue.

Best regards,

Ladislav

在原帖中查看解决方案

0 项奖励
4 回复数
962 次查看
lama
NXP TechSupport
NXP TechSupport

Hi,

You have to erase entire (aligned) sector (EEPROM is a Flash block divided into 1024 sectors of 4 bytes) where the ECC error is reported, reset is not necessary. If the error is reported again then the sector is wrong. In this case, before we say the eep is wrong it is good to check flash/eeprom clock, compare correctness of routines with some example or use standard drivers, you do not use cumulative programming.

Yes your understanding is correct.

 

Best regards,

Ladislav

 

 

0 项奖励
952 次查看
gumu
Contributor IV

Hi @lama ,

If an ECC fault occurs while reading the EEPROM, the system will enter the machine exception interrupt service routine (ISR), and then the system will restart.These are the observations I have made.

0 项奖励
942 次查看
lama
NXP TechSupport
NXP TechSupport

Hi,

Of course, it can happen. The data sheet states…” Each uncorrectable memory corruption, which is detected during a S12ZCPU, ADC or PTU access triggers a machine exception.” … and double bit ECC error in uncorrectable memory corruption.
https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12Z-machine-exception-caused-by-ECC-issue-...
Note; as a fist step I would analyze why this ECC happened. Are you sure you do not use cumulative programming? This is the most frequently appearing issue.

Best regards,

Ladislav

0 项奖励
915 次查看
gumu
Contributor IV

Hi @lama ,

Thank you! Regarding the issue of the system enter the machine exception ISR after an EEPROM ECC failure.

Here is my solution:

Before reading the EEPROM address, we are recording the address. If an EEPROM ECC failure occurs, in the machine exception ISR, we are re-erasing the affected address to prevent repetitive machine exceptions and ensure successful system startup. We would like to seek your advice on this approach.

 

0 项奖励