GD32F10x User Manual
154
Table 7-1. GPIO configuration table
Configuration mode
CTL[1:0]
MD[1:0]
OCTL
Input
Analog
00
0
don’t care
Input floating
01
don’t care
Input pull-down
10
0
Input pull-up
10
1
General purpose
Output (GPIO)
Push-pull
00
00: Reserved
01: Speed up to 10MHz
10: Speed up to 2MHz
11: Speed up to 50MHz
0 or 1
Open-drain
01
0 or 1
Alternate Function
Output (AFIO)
Push-pull
10
don’t care
Open-drain
11
don’t care
Figure 7-1. Basic structure of
shows the basic structure of an I/O port bit.
Figure 7-1. Basic structure of of a general-pupose I/O
Read
Vss
Output
Control
Register
Write
Read/Write
Alternate Function Output
Alternate Function Input
Input driver
Output driver
Registers
Bit Operate
Analog Input/output
V
dd
Input
Status
Register
I / O pin
ESD
protect
7.3.1.
GPIO pin configuration
During or just after the reset period, the alternative functions are all inactive and the GPIO
ports are configured into the input floating mode that input disabled without Pull-Up (PU)/Pull-
Down (PD) resistors. But the JTAG/Serial-Wired Debug pins are in input PU/PD mode after
reset:
PA15: JTDI in PU mode.
PA14: JTCK / SWCLK in PD mode.
PA13: JTMS / SWDIO in PU mode.
PB4: NJTRST in PU mode.
PB3: JTDO in
Floating mode.
The GPIO pins can be configured as inputs or outputs. When the GPIO pins are configured
as input pins, all GPIO pins have an internal weak pull-up and weak pull-down which can be
chosen. And the data on the external pins can be captured at every APB2 clock cycle to the
Summary of Contents for GD32F10 Series
Page 63: ...GD32F10x User Manual 63 programmed during the chip production ...
Page 117: ...GD32F10x User Manual 117 010 1 0 011 0 9 ...
Page 416: ...GD32F10x User Manual 416 shadow register updates every update event ...
Page 427: ...GD32F10x User Manual 427 value ...
Page 518: ...GD32F10x User Manual 518 These bits are not used in SPI mode ...