S32K146 WatchDog disabled

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

S32K146 WatchDog disabled

ソリューションへジャンプ
4,728件の閲覧回数
ShaoTianzhi
Contributor II

Hello:

    When I tested my code, I encountered an issue. In Debug mode, intentionally entering an infinite loop triggered the WatchDog Reset only once. After that, the code ran normally. However, when I tested it without Debug mode, I noticed that the WatchDog did not keep resetting continuously. Why could this be?

0 件の賞賛
返信
1 解決策
4,643件の閲覧回数
Senlent
NXP TechSupport
NXP TechSupport

Hi@ShaoTianzhi

It's hard to say because without your project I can't pinpoint the cause, I can only guess.

You can check whether Update is set at startup

Senlent_0-1696903903523.png

 

元の投稿で解決策を見る

0 件の賞賛
返信
8 返答(返信)
4,709件の閲覧回数
Senlent
NXP TechSupport
NXP TechSupport

Hi@ShaoTianzhi

please check the register CS->DBG is set or not.

If this bit is configured to 1, in debugging mode, after encountering the breakpoint set by the user and stopping, the WDOG watchdog counter will still count, so that it will overflow and trigger the MCU reset soon.

please refer the demo wdog_interrupt_s32k146 which provided by S32 DS.

don't enable debug mode then try again.

Senlent_0-1696745839491.png

0 件の賞賛
返信
4,685件の閲覧回数
ShaoTianzhi
Contributor II

I didn't enable Debug Mode. After one WatchDog Reset, the infinite loop still continues to execute, but the WatchDog no longer resets. Upon observing the registers, after the WatchDog Reset, the initialization code for the WatchDog executes, but the EN register does not change to 1. UPDATE and PRES are also not configured. The CNT stops counting, and TOVAL remains at its default value of 0x0000FFFF.

0 件の賞賛
返信
4,681件の閲覧回数
Senlent
NXP TechSupport
NXP TechSupport

Hi@ShaoTianzhi

Please provide your project and I will try to reproduce your problem.

0 件の賞賛
返信
4,651件の閲覧回数
ShaoTianzhi
Contributor II

I'm sorry, but due to certain reasons, I'm unable to provide my code. The phenomenon I observed is that after a WDOG reset, the UPDATE register becomes zero, preventing the configuration of WDOG. Is there a way to resolve this? Could it be related to the BootLoader program?

0 件の賞賛
返信
4,644件の閲覧回数
Senlent
NXP TechSupport
NXP TechSupport

Hi@ShaoTianzhi

It's hard to say because without your project I can't pinpoint the cause, I can only guess.

You can check whether Update is set at startup

Senlent_0-1696903903523.png

 

0 件の賞賛
返信
4,622件の閲覧回数
ShaoTianzhi
Contributor II

Thank you for your response. I found out that the BootLoader code set UPDATE to 0. The issue has been resolved.

0 件の賞賛
返信
4,707件の閲覧回数
ShaoTianzhi
Contributor II

ShaoTianzhi_0-1696746381511.png

I didn't enable Debug Mode.

Does it have any impact if I don't enable interrupt?

0 件の賞賛
返信
4,702件の閲覧回数
Senlent
NXP TechSupport
NXP TechSupport

Hi@ShaoTianzhi

The difference is that if you enable interrupts, then when the watchdog times out, an interrupt will be generated first and then the MCU will be reset.

0 件の賞賛
返信