Watchdog disable in wait mode

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

Watchdog disable in wait mode

Jump to solution
1,302 Views
tarikaweimrin
Contributor III

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

Labels (1)
0 Kudos
1 Solution
800 Views
dereksnell
NXP Employee
NXP Employee

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

View solution in original post

0 Kudos
3 Replies
800 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

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

0 Kudos
800 Views
tarikaweimrin
Contributor III

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.

0 Kudos
801 Views
dereksnell
NXP Employee
NXP Employee

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

0 Kudos