Sleep Timer (SLP TIMER)
Introduction
The Sleep Timer is a 32-bit hardware timer that can wake the SoC up from sleep state. It can also be used when the SoC is awake.
Main Features
- 32-bit down counter running with two different clock sources: LFXO_32K clock (32.768 kHz) and LFRC_32K clock (about 32 KHz).
- Three operation modes: Basic Sleep Timer, Single-load Sleep Timer, and Auto-reload Sleep Timer
Functional Description
The Sleep Timer supports three operation modes:
- Mode 0 – Basic Sleep Timer: This is the original mode of the Sleep Timer. It only counts down when the SoC is in sleep state and is not activated when the SoC 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 continues to count down even when the SoC is awake. The timer stops when the counter hits zero. The time-out signal is saved as a timeout event.
- Mode 2 – Auto-reload Sleep Timer: Similar to Single-load Sleep Timer mode, the timer does not stop counting down even when the SoC is awake. However, the timer can automatically reload to a value that is the same as that before automatic reload until it is disabled by the MCU.
The AON_WDT, RTC, and SLP TIMER share the same clock source selection. The clock source can be LFRC_32K or LFXO_32K which are described in “Clocks”.
Registers
CFG_0
- Base Address: 0x4000A500
- Offset: 0x00
- Reset Value: 0x00000000
Bits | Field Name | RW | Reset | Description |
---|---|---|---|---|
31:25 |
RSVD |
R |
Reserved bits |
|
24 |
CFG |
W |
0x0 |
Write:
Read: The read value is always 0. |
23:4 |
RSVD |
R |
Reserved bits |
|
3 |
COUNT_MODE |
RW |
0x0 |
Value:
|
2 |
MODE |
RW |
0x0 |
Value:
|
1 |
VAL_SET |
RW |
0x0 |
Set the timer value; write 1 to make the timer value effective. |
0 |
EN |
RW |
0x0 |
Enable Sleep Timer. Value:
|
STS
- Base Address: 0x4000A500
- Offset: 0x38
- Reset Value: 0x00000000
Bits | Field Name | RW | Reset | Description |
---|---|---|---|---|
31:2 |
RSVD |
R |
Reserved bits |
|
1 |
BUSY |
R |
0x0 |
Sleep Timer is running. |
0 |
STAT |
R |
0x0 |
Sleep Timer is busy. Do not configure this bit if the signal is 1. |
TIMER_W
- Base Address: 0x4000A500
- Offset: 0x40
- Reset Value: 0x00000000
Bits | Field Name | RW | Reset | Description |
---|---|---|---|---|
31:0 |
VAL_SET |
RW |
0x0 |
Write: Write the Sleep Timer value to the VAL_W register. Read: The set value. Read SLP_TIMER_VAL_RD in the VAL_R register for the current interval value. |
TIMER_R
- Base Address: 0x4000A500
- Offset: 0x48
- Reset Value: 0x00000000
Bits | Field Name | RW | Reset | Description |
---|---|---|---|---|
31:0 |
VAL_READ |
R |
0x0 |
Read internal value of the Sleep Timer. |