
Rev. 1.00
140 of 486
July 31, 2018
32-Bit Arm
®
Cortex
®
-M0+ MCU
HT32F50231/HT32F50241
9
Alternate Function Input / Output Control Unit (AFIO)
9
Alternate Function Input / Output Control Unit (AFIO)
Features
▄
APB slave interface for register access
▄
EXTI source selection
▄
Configurable pin function for each GPIO, up to sixteen alternative functions on each pin
▄
AFIO lock mechanism
Functional Descriptions
External Interrupt Pin Selection
The GPIO pins are connected to the 16 EXTI lines as shown in the accompanying figure. For
example, users can set the EXTI0PIN [3:0] field in the ESSR0 register to b0000 to select the GPIO
PA0 pin as EXTI line 0 input. Since not all the pins of the Port A ~ C are available in all package
types, please refer to the pin assignment section for detailed pin information. The setting of the
EXTInPIN [3:0] field is invalid when the corresponding pin is not available.
0000
0001
0010
PA0
PB0
EXTIx Pin Selection
EXTI 0
PC0
EXTI 15
PB15
PC15
PA15
EXTI0PIN[3:0]
EXTI15PIN[3:0]
0000
0001
0010
Figure 22. EXTI Channel Input Selection