GR740-UM-DS, Nov 2017, Version 1.7
316
www.cobham.com/gaisler
GR740
22
General Purpose I/O Ports
22.1
Overview
Each bit in the general purpose input output port can be individually set to input or output, and can
optionally generate an interrupt. For interrupt generation, the input can be filtered for polarity and
level/edge detection.
Note that some GPIO pins are used as bootstrap pins, see section 3.1 for further information.
The design has two general purpose I/O port peripherals. The first one, GRGPIO0, with base address
0xFF902000 is connected to the 16 external GPIO signals. The second port, GRGPIO1, with base
address 0xFFA08000 is connected to a set 22 of shared pins. Pin sharing is further described in chap-
ter 3. The only configuration difference between the two peripherals are the signals connected and the
number of connected signals.
The figure 38 shows a diagram for one I/O line.
22.2
Operation
The I/O ports are implemented as bi-directional buffers with programmable output enable. The input
from each buffer is synchronized by two flip-flops in series to remove potential meta-stability. The
synchronized values can be read-out from the I/O port data register. The output enable is controlled by
the I/O port direction register. A ‘1’ in a bit position will enable the output buffer for the correspond-
ing I/O line. The output value driven is taken from the I/O port output register.
The core supports dynamic mapping of interrupts, each I/O line can be mapped using the Interrupt
map register(s) to an interrupt line starting at interrupt 16.
Interrupt generation is controlled by three registers: interrupt mask, polarity and edge registers. To
enable an interrupt, the corresponding bit in the interrupt mask register must be set. If the edge regis-
ter is ‘0’, the interrupt is treated as level sensitive. If the polarity register is ‘0’, the interrupt is active
low. If the polarity register is ‘1’, the interrupt is active high. If the edge register is ‘1’, the interrupt is
edge-triggered. The polarity register then selects between rising edge (‘1’) or falling edge (‘0’).
A GPIO pin can also be toggled when a pulse is detected on an internal signal. This is enabled via the
Pulse register in the core. This functionality is only supported for the first GPIO port, GRGPIO0.
Figure 38.
General Purpose I/O Port diagram
Q
Q
Q
D
D
D
PAD
Direction
Output
Value
Input
Value
Q
D
Input
Value
Input
Value
(Not used)
Output
Value
(Not used)
Alternate
Alternate enable
(Not used)