BS_General purpose input/output (GPIO)
RM0082
326/844
Doc ID 018672 Rev 1
Figure 30.
GPIO signal interfaces diagram
18.3
Main functions description
18.3.1 APB
slave
interface
The
APB slave interface
block allows to connect the GPIO to the AMBA APB bus.
In particular, the APB Slave Interface properly decodes read and write command on APB
bus providing access to GPIO internal registers (data, data direction, mode control and
interrupt). Moreover, these registers are memory-mapped in the APB Slave Interface.
18.3.2
Interrupt detection logic
The
interrupt detection
logic is the GPIO block which allow to generate mask-programmable
interrupts based on either the signal level or the transitional value (edge) of any of GPIO
lines.
As depicted in
, this block interfaces with both the interrupt control registers
(
) hosted by the APB slave and the input signals from pad
(
GPIN[5:0]
).
Depending on registers configuration (see
Section 18.4.2: Control interrupt generation
for
details) and actual input signals features, a GPIO interrupt signal
(
GPIOINTR
)
is generated
by the Interrupt Detection Logic block as the OR combination of all the GPIO masked
interrupt lines.
The resulting combined
GPIOINTR
signal can be then used to indicate to an external
interrupt controller that an interrupt occurred in one or more of the GPIO lines. Additional
output signals
(
GPIOMIS[5:0]
)
are also generated by the interrupt detection logic block,
reflecting the status of each single masked interrupt lines. Provisional of individual outputs
as well as combined interrupt output allows to use either a global interrupt service routine
(trapping the
GPIOINTR
signal) or modular device drivers (looking at
GPIOMIS[5:0]
)
to
handle GPIO interrupts.
Interrupt
(on-chip)
GPIOMIS
Output
6
Masked interrupt signals, to interrupt
controller.
GPIOINTR
Output
1
Combined OR version of
GPIOMIS
, to
interrupt controller.
APB Slave
-
Input/Output -
See AMBA specification.
Table 263.
GPIO signal interface (continued)
Group
Signal name
Direction
Size
(bit)
Description
GPIO
APB Slave
SPI CS Selector
External(To Chip PAD)
Interrupt (On chip)
AM
BA
A
PB
Bu
s