User manual

Table Of Contents
Zynq-7000 AP SoC Technical Reference Manual www.xilinx.com 383
UG585 (v1.11) September 27, 2016
Chapter 14: General Purpose I/O (GPIO)
Software configures the GPIO as either an output or input. The DATA_RO register always returns the
state of the GPIO pin regardless of whether the GPIO is set to input (OE signal false) or output (OE
signal true). To generate an output waveform, software repeatedly writes to one or more GPIOs
(usually using the MASK_DATA register).
Applications might need to switch more than one GPIO at the same time (less a small amount of
inherent skew time between two I/O buffers). In this case, all of the GPIOs that need to be switched
simultaneously must be from the same 16-bit half-bank (i.e., either the most-significant 16 bits or the
least-significant 16 bits) of GPIOs to enable the MASK_DATA register to write to them in one store
instruction.
GPIO bank control (for Bank0 and Bank1) is summarized as follows:
DATA_RO: This register enables software to observe the value on the device pin. If the GPIO
signal is configured as an output, then this would normally reflect the value being driven on the
output. Writes to this register are ignored.
Note: If the MIO is not configured to enable this pin as a GPIO pin, then DATA_RO is
unpredictable because software cannot observe values on non-GPIO pins through the GPIO
registers.
X-Ref Target - Figure 14-2
Figure 14-2: GPIO Channel
UG585_c14_02_022712
DIRM
INT_MASK
INT_DIS
INT_EN
INT_TYPE
IRQ #52 to GIC
INT_POLARITY
Interrupt
Detection
Logic
INT
State
DQ
Clr
INT_ANY
INT_STAT
Read
Write-1-to-clear
Input
Output
Output Enable
DATA
MASK_DATA_LSW
MASK_DATA_MSW
OEN
DATA_RO
MIO
(Banks
0 & 1)
or
EMIO
(Banks
2 & 3)
GPIO
Device Pad
MIO Device I/O
Buffers and Pins
(Banks 0 & 1)