This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

sd_power_system_off() cause reboot

I write this code to set my ble device power down,but it causes reboot without any error report.

                    
     GPIO_WAKEUP_BUTTON_CONFIG(LEFT_BUTTON_PIN_NO);
     GPIO_WAKEUP_BUTTON_CONFIG(RIGHT_BUTTON_PIN_NO);

     err_code = sd_power_system_off();

when I comment out this two lines

                   
       //GPIO_WAKEUP_BUTTON_CONFIG(LEFT_BUTTON_PIN_NO);
       //GPIO_WAKEUP_BUTTON_CONFIG(RIGHT_BUTTON_PIN_NO);

        err_code = sd_power_system_off();

power down worked,but could not wake up from this two button

I try to add


	err_code = app_button_enable();
        APP_ERROR_CHECK(err_code);

befor call sd_power_system_off() but fail too.

Is that right ? if I want wake it up by set the pin from high to low.

Related