disabled the watchdog timer, but reset by the watchdog timer.

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

disabled the watchdog timer, but reset by the watchdog timer.

Jump to solution
2,295 Views
jun1
Contributor V

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.

 

 

 

0 Kudos
1 Solution
2,265 Views
jun1
Contributor V

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.

View solution in original post

0 Kudos
2 Replies
2,270 Views
nxf58904
NXP Employee
NXP Employee

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.

33333333333333333333.png

 

 

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.
-------------------------------------------------------------------------------

0 Kudos
2,266 Views
jun1
Contributor V

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.

0 Kudos