How to save data during reset

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

How to save data during reset

553 Views
Pusoy
Contributor III

Hello,

I am currently using BIST in the project, but before executing BIST, I need to disable the communication peripherals, and a reset occurs after completing the BIST. Therefore, I have not yet found a way to identify the cause of the system reset that occurs before executing BIST.

1. Is there a method to preserve data even after a destructive reset or functional reset occurs?

Tags (1)
0 Kudos
5 Replies

533 Views
petervlna
NXP TechSupport
NXP TechSupport

Hello,

You simply look after reset to RGM [DES/FES] registers after the BIST.

RGM module preserve reset source information trough all type of resets except power on reset.

Best regards,

Peter

0 Kudos

532 Views
Pusoy
Contributor III
Hello, thank you for your reply.

I need to call the Mcu_GetResetReason() function before executing BIST to obtain the previous reset reason.
But this function clears the values of the RGM [DES/FES] registers,.
so I need another method.
0 Kudos

528 Views
petervlna
NXP TechSupport
NXP TechSupport

Hello,

I need to call the Mcu_GetResetReason() function before executing BIST

Ok, so store the RGM content to some NVM. like EEPROM which is quite common use case.

Simply preserve the FES and DES so you can analyze it.

Best regards,

Peter

 

0 Kudos

521 Views
Pusoy
Contributor III
Hello, thank you for your reply.
I forgot to mention that we currently don't have any extra EEPROM space in our project to store data, so that solution doesn't apply to us.
We need a solution where data can still be retained in a RAM area even after a destructive reset occurs.
0 Kudos

515 Views
petervlna
NXP TechSupport
NXP TechSupport

Hello,

But this function clears the values of the RGM [DES/FES] registers,.

Since you are out of options simply modify / write your own function for RGM reads which wont clear them.

We need a solution where data can still be retained in a RAM area even after a destructive reset occurs.

Well, its called a destructive reset for some reason. RAM content is destroyed.

I have not yet found a way to identify the cause of the system reset that occurs before executing BIST.

I would set loop/break right before execution of the BIST, read out the RGM to understand the reset cause from debugger.

Usually you do system reset reading in startup code and branch the code based on its results. I do not understand why you do it right before BIST.

Best regards,

Peter

0 Kudos