Hi,
I want to use the button on the TMS 470M Hercules board. How can I setup the interrupt for rising and falling edge,I want to detect short and long press on the button.
Regards
Christian
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi,
I want to use the button on the TMS 470M Hercules board. How can I setup the interrupt for rising and falling edge,I want to detect short and long press on the button.
Regards
Christian
Hi Christian,
The GIOINTDETx field of the INTDET register (offset 0x8) in the GIO module allows you to configure both a rising edge, and a falling edge, as interrupt conditions. This interrupt still needs to be enabled via the GIOENASET register.
Note that there is no debouncing built into the GIO input circuit, so any glitch filtering must be done externally in hardware, or in software.
Regards, Sunil
Chuck,
If you have enabled interrupt generation on both edges, then you can read the pin level in the ISR to identify which edge caused the interrupt. This will work as long as the edges do not occur at a rate faster than the ISR handler execution.
Regards, Sunil