The general-purpose interface combines eight general-purpose input/output (GPIO) banks.
Each GPIO module provides 32 dedicated general-purpose pins with input and output capabilities; thus, the general-purpose interface supports up to 256 (8 × 32) pins. Some of the pins may be reserved in this Device. For more information of the supported number of GPIO pins, see the device Data Manual.
These pins can be configured for the following applications:
- Data input (capture)/output (drive)
- Keyboard interface with a debounce cell
- Interrupt generation in active mode upon the detection of external events. Detected events are processed by two parallel independent interrupt-generation submodules to support biprocessor operations.
- Wake-up request generation in idle mode upon the detection of external events
These modules do not include pad control
(pullup/down control, open-drain feature). For more information, see Pad
Configuration Registers, in Control Module.
Figure 27-1 is an overview of the general-purpose interface.
The GPIO modules include the following global features:
- Two identical submodules can process synchronous interrupt requests from each channel to be used independently in a biprocessor environment. Each submodule controls its own synchronous interrupt request line. Each submodule also has its own interrupt-enable and interrupt status registers. The interrupt-enable register (GPIO_IRQSTATUS_SET_x [where x = 0 or 1]) selects the channel considered for the interrupt request generation. The interrupt status register (GPIO_IRQSTATUS_RAW_x) determines which channel has activated the interrupt request. Event detection on GPIO channels is reflected into GPIO_IRQSTATUS_RAW independently from the content of the interrupt-enable registers.
- Wake-up requests in idle mode from input channels are merged together to issue one wake-up signal per GPIO module.
- Data input (capture)/output (drive)
- Power-management support
The general-purpose interface has 16 interrupt lines (two interrupt lines on GPIO1 through GPIO8 modules).
Each GPIO module produces a wake-up request signal to the power, reset, and clock management (PRCM) module.
Each channel in the GPIO modules has the following features:
- The GPIOi.GPIO_OE register controls the output
capability for each pin.
- The output line level reflects the value written
in the GPIOi.GPIO_DATAOUT register through the level 4 (L4_WKUP and L4_PER1)
interconnect.
- The input line can be fed to the GPIO module through an optional and configurable debounce cell. (Because the debouncing time value is global for all ports of one GPIO module, up to five different debouncing time values are possible.)
- The value of the input line is sampled into the
GPIOi.GPIO_DATAIN register and can be read through the L4 (L4_WKUP and L4_PER1)
interconnect.
- In active mode, the input line can be used through level and edge detectors to trigger synchronous interrupts. The edge (rising, falling, or both) or the level used (logical 0, logical 1, or both) can be configured.
- In idle mode, the input line can be used to activate the asynchronous wake-up request (on edge detection: rising edge, falling edge, or both).
The module provides an alternative to the atomic
test and set operations for the data-output register (GPIO_DATAOUT). For this
register, the module implements the set-and-clear protocol register update (see
Section 27.4.9, General-Purpose Interface Set-and-Clear Protocol).
All module registers are 8-, 16-, or 32-bit accessible through the OCP-compatible interface (little-endian encoding)