Is it possible to disable the watchdog when in wait/vlpw mode? I am running on a KL26Z and the watchdog on the 1kHz clock
Solved! Go to Solution.
Hi Tarik,
Yes, the SIM_COPC register is a write-once register after reset.
The COP watchdog is still enabled in WAIT or VLPW modes because the bus clock and other clock sources are still enabled in those modes. If you want the COP watchdog enabled, and you would like to use those WAIT modes, then you will need to wake the core periodically to service the COP watchdog, like using another hardware timer interrupt.
Thanks
Hi,
Please use below code to disable the KL26 watchdog before enter into wait/vlpw mode.
/* Disable the watchdog timer */
SIM_COPC = 0x00;
Wish it helps.
Have a great day,
Ma Hui
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
I thought the SIM_COPC can only be written once after a reset. I am writing 0x0C on reset to enable the watchdog but want to enter wait mode with the watchdog disabled.
Hi Tarik,
Yes, the SIM_COPC register is a write-once register after reset.
The COP watchdog is still enabled in WAIT or VLPW modes because the bus clock and other clock sources are still enabled in those modes. If you want the COP watchdog enabled, and you would like to use those WAIT modes, then you will need to wake the core periodically to service the COP watchdog, like using another hardware timer interrupt.
Thanks