Telink TLSR8232 BLE SDK Developer Handbook
AN-19112700-E1
128
Ver.1.0.0
MCU will enter deepsleep in following cases:
1) There is no task (including key press task) for successive 60s duration. In this case,
the problem MCU can’t enter deepsleep due to high level from drive pin can be
avoided.
2) Some button is stuck for 60s. In this case, though high level is input in drive pin, by
inverting the polarity of the stuck drive pin to low-level wakeup, MCU is allowed to
enter deepsleep (refer to section 7.7).
User should note this problem when using Telink GPIO CORE/PAD wakeup.
4.7 BLE System PM Reference
Based on the understanding of the principle of BLE SDK low power management, users
can flexibly configure low power management. See the reference code of low power
management of SDK demo
“5316 ble remote” for reference.
Function
“blt_pm_proc()” is included in UI entry of main_loop. Please note that if UI entry
needs to process multiple tasks,
the “blt_pm_proc()” should be close to the
“blt_sdk_main_loop”, since its setting depends on processing result of other tasks in UI
entry.
Conclusions of low power management are:
1) If suspend needs to be disabled
for task such as IR, the “SuspendMask” should be
set as “SUSPEND_DISABLE”.
2) In Advertising state, if Slave continuous adv time reaches 60s, it should be
configured to enter deepsleep in current main_loop, and wakeup source should be
set as “GPIO PAD” (enable key press wakeup in advance). Software timer is used to
check whether adv time exceeds 60s, and the variable “advertise_begin_tick” serves
to record the system tick when adv starts.
Slave is configured to enter deepsleep after 60s of no advertising, so as to save
power and avoid Slave from advertising when Master fails to respond. Actually user
needs to evaluate power consumption and then determine how to process time for
Adv state.
3) In Conn state, if Slave has no LED task, etc., and all keys are released, Slave is
configured to enter deepsleep in current main_loop when it exceeds 60s away from
the latest valid task, and wakeup sourc
e is set as “GPIO PAD” (enable key press