How to know the microcontroller restart reason

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

How to know the microcontroller restart reason

ソリューションへジャンプ
1,440件の閲覧回数
sudhanshumehta
Contributor IV

Hello,

We are using MK221M controller. 

RTOS MQX4.2

I need to know the restart reason of microcontroller on every reboot.

Example: Microcontroller can restart due to Watchdog, power cycle etc. 

Can you please suggest me way to do that?

Thanks

Sudhanshu 

0 件の賞賛
返信
1 解決策
1,403件の閲覧回数
bobpaddock
Senior Contributor III
I've not used this part, does it have a Reset Control Module (RCM)?

Look for something like System Reset Status Register 0 (RCM_SRS0 and SRS1) etc.

Some times there are also 'sticky' copies. Better to use those results if available.

元の投稿で解決策を見る

0 件の賞賛
返信
4 返答(返信)
1,387件の閲覧回数
sudhanshumehta
Contributor IV

IMG_0282.PNG

Yes RCM->SRS0, RCM->SRS1 are the registers. this is complete detail. bobpaddock was right. you can read printf ("\r\n Restart reason code %.02x %.02x", RCM->SRS0, RCM->SRS1);

0 件の賞賛
返信
1,404件の閲覧回数
bobpaddock
Senior Contributor III
I've not used this part, does it have a Reset Control Module (RCM)?

Look for something like System Reset Status Register 0 (RCM_SRS0 and SRS1) etc.

Some times there are also 'sticky' copies. Better to use those results if available.
0 件の賞賛
返信
1,386件の閲覧回数
sudhanshumehta
Contributor IV

for more details my reply is below

 

0 件の賞賛
返信
1,414件の閲覧回数
danielchen
NXP TechSupport
NXP TechSupport

Hi @sudhanshumehta 

 

I would suggest you ask our partner, Embedded Access, for this question.

https://embedded-access.com/

 

Regards

Daniel

0 件の賞賛
返信