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.

Parents
  • Yes I am using SDK 4.4.2 my chip now is not support the latest version of SDK

    Should I PULL UP this pin before I entering system off?

    I find that GPIO_WAKEUP_BUTTON_CONFIG do
    {
    GPIO_PIN_CONFIG(PIN_NO,
    GPIO_PIN_CNF_DIR_Input,
    GPIO_PIN_CNF_INPUT_Connect,
    GPIO_PIN_CNF_PULL_Disabled,
    GPIO_PIN_CNF_DRIVE_S0S1,
    GPIO_PIN_CNF_SENSE_Low);
    } while (0)

    Do GPIO_PIN_CNF_PULL_Disabled will cause instable? Can I set is to PULL_UP?

Reply
  • Yes I am using SDK 4.4.2 my chip now is not support the latest version of SDK

    Should I PULL UP this pin before I entering system off?

    I find that GPIO_WAKEUP_BUTTON_CONFIG do
    {
    GPIO_PIN_CONFIG(PIN_NO,
    GPIO_PIN_CNF_DIR_Input,
    GPIO_PIN_CNF_INPUT_Connect,
    GPIO_PIN_CNF_PULL_Disabled,
    GPIO_PIN_CNF_DRIVE_S0S1,
    GPIO_PIN_CNF_SENSE_Low);
    } while (0)

    Do GPIO_PIN_CNF_PULL_Disabled will cause instable? Can I set is to PULL_UP?

Children
No Data
Related