S32R274 Program and erase flash error

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

S32R274 Program and erase flash error

764 Views
jjr_net
Contributor I

hello:

       I wrote a bootloader program that erased and wrote normally.These days suddenly found a MCU in the write failure, can not start again, even if the power up and down.

       From the view of RAM_DEBUG mode of PE, the flash code of the bootloader program exists and is correct, but the code area of the APP is 0x00 instead of 0xFF. and it cannot be started with lauterbach to track the problem. I don't know why this happens.Is the electricity lost in the process of writing or erasing?How can I recover it using software?

       As the task is very urgent, please help as soon as possible, thank you very much!

0 Kudos
Reply
1 Reply

677 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi Jiran,

most likely, program or erase operation was terminated by unexpected reset or power down. The flash is left in undetermined state in this case (not whole flash, only the flash which was modified at that moment). Such flash usually contains a lot of double bit ECC errors. When you read corrupted flash, IVOR1 exception is triggered. IVOR1 should be handled appropriately in your project.

The solution to recover is to erase affected blocks.

There's an application note written for MPC55xx/56xx devices but it could help also for MPC57xx/S32R to some level:

https://www.nxp.com/docs/en/application-note/AN5200.pdf 

https://www.nxp.com/docs/en/application-note-software/AN5200SW.zip 

Regards,

Lukas

0 Kudos
Reply