mm9z1-638:about EEPROM ECC question

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

mm9z1-638:about EEPROM ECC question

Jump to solution
1,259 Views
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!

Tags (1)
0 Kudos
Reply
1 Solution
1,208 Views
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

View solution in original post

0 Kudos
Reply
4 Replies
1,229 Views
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 Kudos
Reply
1,219 Views
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 Kudos
Reply
1,209 Views
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 Kudos
Reply
1,182 Views
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 Kudos
Reply