See the block diagram for high level function and connectivity. The timer interacts with the CPU core and the power manager and reset manager to drive wakeup / reset events and interrupts. There is also an extra input to tell the counter whether to run (“counter-run”). This is used to stop the watchdog timer running when in debugging mode or when the alert handler has put the system in a “killed” state.
The always-on timer will run on a ~200KHz clock. The timers themselves are 32b wide, giving a maximum timeout window of roughly ~6 hours. For the wakeup timer, the pre-scaler extends the maximum timeout to ~1000 days.
Register reads via the TLUL interface are synchronized to the slow clock using the “async” register generation feature. This means that writes can complete before the data has reached its underlying register in the slow clock domain. If software needs to guarantee completion of a register write, it can read back the register value (which will guarantee the completion of all previous writes to the peripheral).
WKUP_COUNT
and WDOG_COUNT
to zero.WKUP_CTRL
.WKUP_THOLD
, WDOG_BARK_THOLD
and WDOG_BITE_THOLD
.WKUP_CTRL
/ WDOG_CTRL
registers.regwen
bit in WDOG_REGWEN
.Pet the watchdog by writing zero to the WDOG_COUNT
register.
If either timer reaches the programmed threshold, interrupts are generated from the AON_TIMER module. Disable or reinitialize the wakeup timer if required by clearing the enable bit in WKUP_CTRL
or clearing the timer value in WKUP_COUNT
. Clear the interrupt by writing 1 into the Interrupt Status Register INTR_STATE
.
If the timer has caused a wakeup event (WKUP_CAUSE
is set) then clear the wakeup request by writing 0 to WKUP_CAUSE
.
If WKUP_COUNT
remains above the threshold after clearing the interrupt or wakeup event and the timer remains enabled, the interrupt and wakeup event will trigger again at the next clock tick.