EasyManua.ls Logo

ARTERY AT32F421C8T7 - General-Purpose Input Configuration; Analog Input;Output Configuration; General-Purpose Output Configuration; GPIO Port Protection

Default Icon
337 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
AT32F421 Series Reference Manual
2022.11.11 Page 83 Rev 2.02
6.2.3 General-purpose input configuration
Mode
IOMC
PUPD
Floating input
00
00
Pull-down input
10
Pull-up input
01
When I/O port is configured as input:
Get I/O states by reading the input data register.
Support floating input, pull-up/pull-down input configuration.
Schmitt-trigger input is activated.
Output is disabled.
Note: In floating input mode, it is recommended to set the unused pins as analog input mode in order to
avoid leakage caused by interference from unused pins in a complex environment.
6.2.4 Analog input/output configuration
Mode
IOMC
PUPD
Analog input/output
11
Unused
When I/O port is configured as analog input:
Schmitt-trigger input is disabled.
Digital input/output is disabled.
Without any pull-up/pull-down resistor.
6.2.5 General-purpose output configuration
Mode
IOMC
OM
HDRV
ODRV[1: 0]
PUPD
Push-pull without
pull-up/pull-down
01
0
000: Output mode, normal sourcing/sinking strength
001: Output mode, large sourcing/sinking strength
010: Output mode, normal sourcing/sinking strength
011: Output mode, normal sourcing/sinking strength
1xx: Output mode, Maximum sourcing/sinking
strength
Any value
Open-drain without
pull-up/pull-down
01
1
000: Output mode, normal sourcing/sinking strength
001: Output mode, large sourcing/sinking strength
010: Output mode, normal sourcing/sinking strength
011: Output mode, normal sourcing/sinking strength
1xx: Output mode, Maximum sourcing/sinking
strength
Any value
When I/O port is configured as output:
Schmitt-trigger input is enabled
Output through output register
Pull-up/pull-down resistors are disabled
In open-drain mode, forced output 0, and use pull-up resistor to output 1
In push-pull mode, output 0/1 using output register
GPIO set/clear register is used to set or clear the corresponding GPIO data output register
Note: When writing 1 to the IOCB/IOSB bits of the GPIO set/clear register, IOSB has priority over
IOCB.
6.2.6 GPIO port protection
Locking mechanism is available to freeze the I/O configuration for the purpose of protection. When
LOCK is applied to a port bit, its configuration cannot be modified until the next reset or power on.

Table of Contents

Related product manuals