S32K146 WatchDog disabled

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

S32K146 WatchDog disabled

Jump to solution
4,737 Views
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 Kudos
Reply
1 Solution
4,652 Views
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

 

View solution in original post

0 Kudos
Reply
8 Replies
4,718 Views
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 Kudos
Reply
4,694 Views
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 Kudos
Reply
4,690 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@ShaoTianzhi

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

0 Kudos
Reply
4,660 Views
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 Kudos
Reply
4,653 Views
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 Kudos
Reply
4,631 Views
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 Kudos
Reply
4,716 Views
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 Kudos
Reply
4,711 Views
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 Kudos
Reply