Hi,
We are using nordic nRF52832 in our project as per our requirement we have to implement sleep and wake up mode with the help of button interrupt.our use case is that after long press of 3 seconds device starts advertising(exit sleep mode). and again after long press of 3 sec device goes to sleep mode(ideal state).
Initially we have tried this functionality by make test code that if button is pressed for 5 seconds LEDs glows and aging pressing same button for 3 sec LEDs go off.
But when we are using same implementation to shut down device {sd_power_system_off()} the device goes to sleep but the device does not wakes up. are there any configuration setting which we need to do so that device exits sleep mode.
I am attaching the code functions which we are using to wake and sleep device.
static void bsp_event_handler(bsp_event_t event)
{
switch (event)
{
case BSP_EVENT_KEY_1:
if(long_pressed==1)
{
bsp_board_leds_off();
sleep_mode_enter();
}
else
{
bsp_board_leds_on();
}
break;
default:
break;
}
}