Debouncer using LFCLK? Wake up from Deep Sleep

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

cross mob
Anonymous
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.

0 Likes
2 Replies
lock attach
Attachments are accessible only for community members.
rola_264706
Level 8
Level 8
50 likes received 25 likes received 10 likes received

This document should help.

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

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.

   

 

   

Bob