Please kindly advise.
I have disabled the watchdog timer, but it seems to be reset by the watchdog timer.
The following sources. I am using SDK_2.6.0_MKE04Z128xxx4.
Disable the watchdog timer.
WDOG8_GetDefaultConfig (& wdogConfig);
wdogConfig.timeoutValue = WDOG_TIMEOUT;
wdogConfig.enableInterrupt = true;
wdogConfig.enableWdog8 = false; // for debug
WDOG8_Init (WDOG, & wdogConfig);
So, at startup, check with the following function at the beginning.
bool boardResetWDT (void)
{
uint32_t bl = SIM_SRSID_WDOG (1);
uint32_t srsid = (SIM-> SRSID);
.
if ((bl & srsid)! = 0u) { // 1 Reset caused by WDT
return true;
}
return false;
}
Then it will return true.
I left it unattended and restarted surely, so I was investigating whether the watchdog was the cause, but even if I disabled it, it restarted and it seems that the watchdog is the cause, but what is happening? Is not it?
Is there anything other than the watch dock that causes the reboot?
Thank you.
jun.
Solved! Go to Solution.
Hi.
solved.
It seems that it was reset because the watchdog timer was not cleared within 16 cycles (an interrupt was inserted in between). After clearing the watchdog timer in the interrupt disabled state, the reset no longer occurs.
Thank you very much.
jun.
Hi,
Have you enabled the watchdog before you disable the wadg?
Can you refer this link to check if wdg went to wdg_handle.https://community.nxp.com/t5/Kinetis-Microcontrollers/disabled-the-watchdog-timer-but-reset-by-the-w....
And can you debug to check if WDOG_CS1.7 has been set after you disabled the wdg.
Jianyu:
Have a great day,
TIC
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Hi.
solved.
It seems that it was reset because the watchdog timer was not cleared within 16 cycles (an interrupt was inserted in between). After clearing the watchdog timer in the interrupt disabled state, the reset no longer occurs.
Thank you very much.
jun.