Strictly necessary cookies are on by default and cannot be turned off. Functional, Performance and Tracking/targeting/sharing cookies can be turned on below based on your preferences (this banner will remain available for you to accept cookies). You may change your cookie settings by deleting cookies from your browser. Then this banner will appear again. You can learn more details about cookies HERE.
Strictly necessary (always on)
Functional, Performance and Tracking/targeting/sharing (default off)
We're using an 20736S and we're trying to differentiate between a single, double, and triple button press. We're getting some extra triggering of the interrupt on the button due to bouncing. We do have a pull down resistor on the pin, and we're configuring the pin using gpio_configurePin (we're using P4 in this case) with:
It's my understanding that there's debouncing logic already in the firmware and we'd like to try to use that before writing our own. Do we have to do anything special to use the firmware capability, or should we be using different configuration settings. We've tried a variety of different settings but none seem to make a difference.
If you are using a raw GPIO, then you will need to implement all of the debouncing yourself.
However, if you use GPIO_BUTTON, firmware does a little debouncing 3-4ms. If you need more, then you will need to run a state machine and start off a timer then wait for x number of ms, then check the condition and adjust debounce yourself.