Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

PSoC™ 4

Not applicable

I'd like to wake my PSOC4BLE system from deep sleep using a push button switch. The button, when pressed, grounds a pulled-up GPIO pin. I want to generate an interrupt when the button is pressed, and wake the system.


I normally debounce the switch in code, or with the Debounce 1.0 component from the library.  I am following the debouncer example in the PSOC examples library, where the isr connects to the debouncer output. 


The Debouncer requires a clock input, but I only have access to the HFCLK as my reference clock. This is shut down in deep sleep, so the debouncer does not run, and therefore the interrupt is not triggered when the button is pressed. Is there a way to select the LFCLK? I only have access to the Auto and HFCLK in the drop-down when configuring the Debouncer component.


If there isn't a way, what is a good way of debouncing when waking from deep sleep?


Thanks in advance.

2 Replies
Level 8
50 likes received 25 likes received 10 likes received
Level 8

This document should help.

Level 10
50 questions asked 10 questions asked 1000 solutions authored
Level 10

You do not need any debouncing when you want to be woken up from deep-sleep. The situation that the pin is pulled low is reason enough to wake up, even if the pin then starts to bounce. The GPIO pin itself has got the ability to generate an interrupt which can be used to wake the system.