3 Replies Latest reply on Feb 5, 2015 6:07 AM by PhGi_2174146

    Button Debounce in Firmware

    PhGi_2174146

      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:

       

      GPIO_INPUT_ENABLE | GPIO_EN_INT_RISING_EDGE | GPIO_PULL_DOWN, GPIO_PIN_INPUT_LOW

       

      We've also setup the port in the BLE_PROFILE_GPIO_CFG with:

       

      GPIO_INPUT  | GPIO_INIT_LOW  | GPIO_BUTTON | GPIO_INT

       

      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.

       

      Thank you.