MPU I/O
7-24
7.3.7
Event Capture Module
The GPIO event capture mode allows latching the input value present on
the GPIO ports each time a rising or a falling edge occurs on a selected GPIO
port, here called GPIO_CLK. If not masked, the GPIO_CLK-selected edge
generates an interrupt to the processor, as shown in Figure 7–15.
Figure 7–15. GPIO_CLK Timing
ÎÎÎÎ
ÎÎÎÎ
GPIO_CLK
GPIOs
GPIO_INT
Latched
data
GPIO_CLK can be generated from an external physical module. Consequent-
ly, it may be necessary to insert a debouncing delay on this signal. The
debouncing time is programmable in the GPIO debouncing register
(GPIO_DEBOUNCING_REG) in steps of 31
µ
s.
The GPIO event mode register (GPIO_EVENT_MODE_REG) enables or
disables the GPIO event mode. It also selects the external pin used as the
GPIO_CLK. The GPIO interrupt edge register (GPIO_INT_EDGE) selects the
GPIO_CLK falling or rising edge to generate the GPIO_INT interrupt.
When the gpios_int interrupt (active low) is generated, the GPIO_INT register
must be read by the MPU to define any active GPIO signal interrupts.
The GPIO interrupt mask register (GPIO_MASKIT) masks GPIO interrupts
individually.
On the GPIO_CLK programmed edge, after the debouncing delay, the internal
MPUIO_IN bus is latched in the GPIO latch register (GPIO_LATCH_REG). Its
value can be read after the detection of the interrupt, even if the external value
has changed.
The event capture process is shown in Figure 7–16.