How to save data during reset

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

How to save data during reset

892 次查看
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?

标记 (1)
0 项奖励
回复
5 回复数

872 次查看
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 项奖励
回复

871 次查看
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 项奖励
回复

867 次查看
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 项奖励
回复

860 次查看
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 项奖励
回复

854 次查看
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 项奖励
回复