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

System off wakeup by release of key

Hello,

 I am developing a  remote device which uses system off mode for idle state. I also have the condition where extra long press of any key that is beyond the long press timeout will force device to enter in system off mode. But due to this i am facing auto wakeup from system off which i dont want .So I found that any signal change to gpio pin that may be low to high or high to low is detect signal for that GPIO which is causing reset. My question is that Can we identify that system got wakeup due to press event or release event. ?

Gpio configuration used is

 

static void buttons_init(void)
{
    ret_code_t err_code;

    //The array must be static because a pointer to it will be saved in the button handler module.
    static app_button_cfg_t buttons[] =
    {
        {PAGE_SEL_KEY, false, BUTTON_PULL, button_event_handler},
    };

    err_code = app_button_init(buttons, ARRAY_SIZE(buttons),
                               BUTTON_DETECTION_DELAY);
    APP_ERROR_CHECK(err_code);
    err_code = app_button_enable();
    APP_ERROR_CHECK(err_code);
}

Thanks and regards.

Parents
  • RESETREAS will only tell you that the reset was triggered by a pin reset.

    You can, however, specify the sense e.g. release or press, of the pin used to trigger the wakeup with nrf_gpio_cfg_sense_set(), but I suspect that you've probably already done that.

    Another option is to check the time that a button has been pressed for, but don't trigger the shutdown into SYSTEM OFF until after the button has been released. 

  • Another option is to check the time that a button has been pressed for, but don't trigger the shutdown into SYSTEM OFF until after the button has been released.

    We need very low current consumption also as it is the product requirement i cant do this.

    You can, however, specify the sense e.g. release or press, of the pin used to trigger the wakeup with nrf_gpio_cfg_sense_set(), but I suspect that you've probably already done that.

    Yes i am already doing this but no luck.

    I am now trying to store key press data to flash memory as it can read out on every reset  condition. 

    Please suggest me if there is another way.

  • cbd said:
    Another option is to check the time that a button has been pressed for, but don't trigger the shutdown into SYSTEM OFF until after the button has been released. 

    I think that is the way to go, I do not see how that should affect current consumption (since the time can be measured with RTC) unless the user repeatedly go to system OFF.

Reply
  • cbd said:
    Another option is to check the time that a button has been pressed for, but don't trigger the shutdown into SYSTEM OFF until after the button has been released. 

    I think that is the way to go, I do not see how that should affect current consumption (since the time can be measured with RTC) unless the user repeatedly go to system OFF.

Children
No Data
Related