mm9z1-638:about EEPROM ECC question

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

mm9z1-638:about EEPROM ECC question

ソリューションへジャンプ
1,257件の閲覧回数
gumu
Contributor V

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 解決策
1,206件の閲覧回数
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 返答(返信)
1,227件の閲覧回数
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 件の賞賛
返信
1,217件の閲覧回数
gumu
Contributor V

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 件の賞賛
返信
1,207件の閲覧回数
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 件の賞賛
返信
1,180件の閲覧回数
gumu
Contributor V

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 件の賞賛
返信