Mcu Reset Reason query

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

Mcu Reset Reason query

570件の閲覧回数
CaoRq
Contributor II

Hi ,NXP

     I am using S32K3 chip now,but  I am facing a problem

    Boot and App both use the function Mcu_GetResetReason,but the function will clear the reset Reason in it's first call. So when Boot jump to App ,App cannot get the reset reason .

    Can you tell me how to solve it

    Thank you in advance

0 件の賞賛
返信
1 返信

542件の閲覧回数
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi @CaoRq 

That's desired behavior. Here's the reason:

 

image.png 

image.png

If the flags are not cleared, you wouldn't be able to get the most recent source of reset next time. Only power-on reset clears the flag, so the flags would cumulate in the registers after "non-power-on" resets and it would not be possible to recognize which flag was set as the last one.

Solution - read the reset reason by Mcu_GetResetReason and store it in own variable for next use.

Regards,

Lukas

 

0 件の賞賛
返信