Dear Dialog team,
I referenced ble_app_sleepmode project to implement button wake up in ble_app_barebone project. Also I use app_timer_set() to be able to wake up periodically for beacon.
The mode I used to do sleeping is extended sleep mode. The function to start sleeping is as below.
void user_app_adv_undirect_complete(uint8_t status)
{
...
app_timer_set(APP_BEACON_TIMER, TASK_APP, delay);
arch_set_extended_sleep();
arch_ble_ext_wakeup_on();
app_button_enable();
...
}
Now, I can wake up periodically by BLE timer correctly. But when I press the button, the system will be reset.
Is it related to OTP usage as well as Deep Sleep mode? Because I am burning the codes on Flash.
Best regards,
Simon
P.S. app_button_press_cb( ) and app_wakeup_cb( ) are changed slightly so that I don't think they will affect the result.