Telink TLSR8232 BLE SDK Developer Handbook
AN-19112700-E1
120
Ver.1.0.0
Figure 4-2 PM in Link Layer Idle state
The figure above show
s simple reference code: When Link Layer is in Idle state, there’s
10ms suspend during each mainloop.
In Idle state, MCU can also enter deepsleep mode directly.
4.2.2 PM in BLE Adv State & Conn State
When Link Layer is in Advertising state or Conn state Slave role:
1) In Advertising state, during each Adv Interval, the remaining time except for Adv
Event can be used to process UI task or enter suspend.
2) In Conn state Slave role, during each Conn interval, the remaining time except for
Brx Event (brx start + brx w brx post) can be used to process UI task or
enter suspend.
Actually BLE PM includes the management of the UI task/suspend duration. User can
manage this duration, and determine whether to run UI task or enter suspend to save
power.
BLE PM does not include the management of deepsleep. User can directly invoke
“cpu_sleep_wakeup” in UI layer to enter deepsleep.
BLE PM
does not need user to directly invoke the API “cpu_sleep_wakeup” in PM driver
layer. In BLE stack part of 826x BLE SDK, according to states and low power modes of
Link Layer
, a PM mechanism is supplied (code is in “blt_sdk_main_loop”). Users only
need to call corresponding API to configure and manage low power.
4.3 BLE PM Configuration
4.3.1 PM Module Initialization
Similar to the design of Link Layer state machine, PM module needs to be enabled in
initialization by calling the API below. For applications with no need of PM this API does