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.