Telink TLSR8232 BLE SDK Developer Handbook
AN-19112700-E1
119
Ver.1.0.0
3) cpu_sleep_wakeup (0, PM_WAKEUP_CORE | PM_WAKEUP_TIMER,clock_time() +
50*
CLOCK_SYS_CLOCK_1MS
);
MCU enters suspend mode when this function is executed, and it can be woke up by
GPIO CORE and TIMER. Timer wakeup time is set as 50ms relative to function
execution moment; if GPIO CORE wakeup is triggered before 50ms expires, MCU
will be woke up by GPIO, otherwise MCU will be woken up by Timer.
4) cpu_sleep_wakeup (1, PM_WAKEUP_PAD, 0);
MCU enters deepsleep mode when this function is executed, and it can be woken up
by GPIO PAD.
5) cpu_sleep_wakeup (1, PM_WAKEUP_TIMER, clock_time() + 8*
CLOCK_SYS_CLOCK_1S)
;
MCU enters deepsleep mode when this function is executed, and it can be woken up
by Timer. Deep sleep time is 8s.
6) cpu_sleep_wakeup (1, PM_WAKEUP_PAD | PM_WAKEUP_TIMER,clock_time() +
10*
CLOCK_SYS_CLOCK_1S
);
MCU enters deepsleep mode when this function is executed, and it can be woken up
by GPIO PAD and Timer. Timer wakeup time is 10s relative to function execution
moment. If GPIO PAD wakeup is triggered before 10s expires, MCU will be woke up
by GPIO, otherwise MCU will be woken up by Timer.
4.2 BLE Low Power Management
In 5316 BLE SDK, low power management is implemented via power management of
Link Layer.
In current Telink BLE SDK, stack bottom layer only implements low power management
for Advertising state and Connection state Slave role, and a set of APIs are supplied for
user. As for other states, low power management is not directly supplied, or it’s needed
to invoke PM driver to implement PM, e.g. PM in Idle state.
4.2.1 PM In Idle State
When Link Layer is in Idle state
, the “blt_sdk_main_loop” does not execute any
operation. In this state SDK does not provide any low power management and users
need to configure it themselves. Users may call
“cpu_sleep_wakeup()” to implement low
power management to configure MCU to enter suspend or deepsleep mode, and set
wakeup sources correspondingly.