
7.0 General-Purpose Input/Output (GPIO) Ports
(Continued)
www.national.com
138
Revision1.2
P
Event Debounce Enable
The input signal can be debounced for about 15 msec before entering the detector. To ensure that the signal is stable, the
signal state is transferred to the event detector only after a debouncing period during which the signal has no transitions.
The debouncer adds a 16 msec delay to both assertion and de-assertion of the event pending indicator (IRQ, SMI, SCI).
The debounce is controlled by Event Debounce Enable (bit 6 of the GPCFG1 register).
Event Type and Polarity
Two trigger types of event detection are supported: edge and level. An edge event may be detected upon a source pin tran-
sition either from high to low or low to high. A level event may be detected when the source pin is either at high or low level.
The trigger type is determined by Event Type (bit 4 of the GPCFG1 register). The direction of the transition (for edge) or the
polarity of the active level (for level) is determined by Event Polarity (bit 5 of the GPCFG1 register).
The term
active edge
refers to a change in a GPIO pin level that matches the Event Polarity bit (1 for rising edge and 0 for
falling edge).
Active level
refers to the GPIO pin level that matches the Event Polarity bit (1 for high level and 0 for low level).
The corresponding bit of the GPEVST register is set by hardware whenever an active edge or an active level is detected
regardless of the GPEVEN register setting. Writing 1 to the Status bit clears it to 0. Writing 0 is ignored.
A GPIO pin is in event pending state if an active event occurred (the corresponding bit of the GPEVST register is set) and
the corresponding bit of the GPEVEN register is set.
7.3.2
System notification on GPIO-triggered events is achieved by asserting at least one of the following output pins:
Interrupt Request (via the Interrupt Serializer in the LPC Bus Interface).
System Management Interrupt (SIOSMI, via the System Wake-Up Control).
The system notification for each GPIO pin is controlled by the corresponding bit in the GPEVEN register and the bits of the
GPEVR register. System notification by a GPIO pin is enabled if the corresponding bit of the GPEVEN register is set to 1.
The bits of the GPEVR register select the means of system notification (IRQ or SMI) that the detected GPIO event is routed
to. The event routing mechanism is described in Figure 38.
System Notification
Figure 38. GPIO Event Routing Mechanism for System Notification
The system notification to the target is asserted if at least one GPIO pin is in event pending state.
The selection of the target (the means of system notification) is determined by the GPEVR register. If IRQ is selected as one
of the means for the system notification, the specific IRQ number is determined by the IRQ selection procedure of the device
configuration. The assertion of IRQ (as a means of system notification) is disabled either when the GPIO functional block is
deactivated or when the V
DD
power is Off.
The assertion of SMI is independent of the activation of the GPIO functional block. SMI from GPIO pins connectedto a device
powered by V
DD
(VDDLOAD = 1 in the GPCFG2 register) is disabled when the V
DD
power is Off. However, SMI from GPIO
pins connected to a device powered by V
SB
(VDDLOAD = 0) is not affected by the status of the V
DD
power.
GPIO Event Pending Indication
SIOSMI
IRQ
Event
Routing
Logic
Enable
IRQ
Routing
Event Routing Register
(GPEVR)
Bit 1
Bit 0
Routed Events
from other GPIO Pins
Routing
Enable
SMI
GPIO Pin
GPIO Event to
GPIO Event to