The general-purpose I/O (GPIO) interface has debounce circuitry included to remove signal glitches. The debounce clock frequency ranges from 125 Hz to 32 kHz. The minimum pulse width is one debounce clock cycle and the minimum detectable GPIO pulse width is 62.5 µs (at 32 kHz). Any pulses shorter than two debounce clock cycles are filtered by the GPIO peripheral.
If the external signal is less than one clock cycle, the external signal is filtered. If the external signal is between one and two clock cycles, the external signal may or may not be filtered depending on the phase of the signal. If the external signal is more than two clock cycles, the external signal will not be filtered.
To ensure that the external signal is correctly debounced, set the debounce clock low enough so that by the time two debounce clock periods have passed, the signal has settled.
Did you find the information on this page useful?