32-Bit Arm
®
Cortex
®
-M0+ MCU
HT32F52220/HT32F52230
9
Alternate Function Input/Output Control
Unit (AFIO)
Introduction
In order to expand the flexibility of the GPIO or the usage of peripheral functions, each IO pin can
be configured to have up to sixteen different functions such as GPIO or IP functions by setting the
GPxCFGLR or GPxCFGHR register where x is the different port name. According to the usage of
the IP resource and application requirements, suitable pin-out locations can be selected by using
the peripheral IO remapping mechanism. Additionally, various GPIO pins can be selected to be
the EXTI interrupt line by setting the EXTInPIN [3:0] field in the ESSRn register to trigger an
interrupt or event. Please refer to the EXTI section for more details.
APB Interface
Peripheral IP I / O
Alternate function output through GPIO
APB Interface
Alternate function input through GPIO
Figure 20. AFIO Block Diagram
Rev. 1.10
AFIO control signal
AFIO Configuration
Registers
Lock Signal
AFIO output signal
Alternative Function
Output Selections
AFIO control signal
AFIO Configuration
Registers
Lock Signal
AFIO Input signal
Peripheral IPm Input
Peripheral IPn Input
AFIO Input signal
130 of 366
PxLOCKR
GPIOx
GPIO Module
PxLOCKR
GPIOx
GPIO Module
November 09, 2018
Need help?
Do you have a question about the HT32F52220 and is the answer not in the manual?
Questions and answers