Functional Description
Sleep Timer has three operation modes.
- Mode 0 – Basic Sleep Timer: This is the original mode of the Sleep Timer. It only counts down in Deep Sleep state and is not activated when the chip is awake.
- Mode 1 – Single-load Sleep Timer: In this mode, the timer starts counting as soon as it is put in this mode and it will continue to count down even when the chip is awake. The timer will stop when the counter hits zero. The time-out signal will be saved as a time-out event.
- Mode 2 – Auto-reload Sleep Timer: Similar to Single-load Sleep Timer mode, the timer will not stop counting down even when the chip is awake. But the timer can auto reload to the same value until it is disabled by MCU.
To switch operation modes, software should issue separate power control commands. To initialize the timer, software needs to write to the sleep timer value register VAL_SET and issue a load command. To read the Sleep Timer value, software needs to set the timer select register TIMER_READ_SEL first, to choose from the three timers in AON power domain.