Periodic wakeup question

2 posts / 0 new
Last post
mjara
Offline
Last seen:4 years 2 weeks ago
加入:2016-08-17 20:20
Periodic wakeup question

Hello,

I know that there is a periodic wake-up period defined by:

#define CFG_MAX_SLEEP_DURATION_EXTERNAL_WAKEUP_MS 10000 //10 seconds example

Do you know which function is called when the device entered to normal state after this periodic wake-up period? I want to use the ADC for a short time every hour, while the rest of the time I want to be in sleep mode.

Thank you for your help!

Best,

Matías

Device:
MT_dialog
Offline
Last seen:2 months 2 weeks ago
工作人员
加入:2015-06-08 34
Hi mjara,

Hi mjara,

The waking up is a certain procedure, the fact that the device stays awake when there is a BLE action is because the scheduler detects that there are BLE messages and the device should stay awake in order to serve them. In the case that there are no BLE messages the device will wake up normally and pass through the entire main loop, so if you would like to get some some ADC samples you can place it the the hook callbacks that the SDK provides, like the app_on_ble_powered callback.

Thanks MT_dialog