ADuCM320 Hardware Reference Manual
UG-498
Rev. C | Page 91 of 196
DIGITAL I/Os
DIGITAL I/Os FEATURES
The
features multiple general-purpose bidirectional digital input/output (GPIO) pins. Most of the GPIO pins have multiple
functions, configurable by user code. At power up, all but one of these pins are configured as GPIOs; one pin reflects the state of the POR.
This pin can also be configured by user code to be used as a GPIO. On power-up, these pins are configured as inputs with their
corresponding pull-up or pull-down disabled. There are five ports 8 bits wide, but not all bits on some ports are accessible. Inaccessible
bits must be ignored.
DIGITAL I/Os BLOCK DIAGRAM
111
76
-43
0
INPUT DATA
INPUT ENABLE
OUTPUT DATA
OUTPUT ENABLE
PULL-UP ENABLE
GPIO
GPxPUL
IOVDD
GPxOE
GPxIE
GPxIN
GPxCLR, GPxTGL
GPxOUT, GPxSET,
Figure 16. GPIO Structure for Port P0 to Port P3
The pin circuit of Port P0 to Port P3 is shown in Figure 16. Port P4 and Port P5 are essentially the same, but instead of the pull-ups, there
are pull-downs to IOGND.
DIGITAL I/Os OVERVIEW
The GPIOs are grouped into six ports: Port 0 to Port 5. Each GPIO can be configured as input, output, or fully open circuit. In input
mode, the internal pull-up/pull-down can be enabled by software. All I/O pins, except P3.0 to P3.6 in MDIO mode, are functional over
the full supply range (IOV
DD
= 3.1 V to 3.6 V (maximum)), and the logic input voltages are specified as percentages of the supply as follows:
V
INL
= 0.25 ×
IOV
DD
max
V
INH
= 0.58 ×
IOV
DD
min
The absolute maximum input voltage is IOV
DD
+ 0.3 V. The typical leakage current of the GPIOs configured as input or open circuit is
50 nA per GPIO. When the
enters a power saving mode, the GPIO pins retain their states. Note that in power save mode, a
driving peripheral cannot drive the pin. That is, if the UART is driving the pin upon entry to deep sleep, it is isolated from the pin and
power is gated. Its state and control are restored upon wake-up.
Inaccessible Bits
Some of the bits of P2, P3 and P4 are not brought out of the package. The pin definitions in Table 121 indicate which are accessible. The
inaccessible bits are still implemented. Therefore the pullups/pulldowns for these should be disabled using the GPxPUL MMRs so they do
not waste power. Also, such outputs should be disabled using the GPxOE MMRs. These settings are the default at power up. On the other
hand, P5.4 to P5.7 are not implemented at all.
DIGITAL I/Os OPERATION
Each digital IO is configured, read, and written independent of the other bits.
GP Input Data (GPxIN)
GPxIN contains the pin input levels if enabled as inputs by GPxIE.
GP Output Data (GPxOUT)
The values of GPxOUT are output on the GPIO pins when configured as outputs by GPxOE.
I/O Data Out Enable (GPxOE)
GPxOE enables the values of GPxOUT to be output on the GPIO pins.