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

Undesired wakeup from System OFF with a button release event

Hello,

I'm attempting to enter System OFF mode via sleep_mode_enter() using a long press. However, I want to wake up from System OFF using that same button. The problem is that the release event from the long press is making it wake up. When the long press is detected I call sleep_mode_enter() and the wake up button is enabled via bsp_wakeup_button_enable(). However, since I enable the same button I use for long press, when I release the button, the system wakes up. One solution is to call the sleep_mode_enter() on the release event rather than on the press event. This is not ideal from a UI perspective. Is there a way to sense only from High to Low but not from Low to High? Or do you see another solution to the problem?

Best,

Ricky

Related