32-Bit Arm
®
Cortex
®
-M0+ MCU
HT32F52220/HT32F52230
External Interrupt/Event Line Mapping
All GPIO pins can be selected as EXTI trigger sources by configuring the EXTInPIN [3:0] field in
the AFIO ESSRn (n = 0 ~ 1) register to trigger an interrupt or event. Refer to the AFIO section for
more details.
Interrupt and Debounce
The application software can set the DBnEN bit in the EXTIn Interrupt Configuration Register
EXTICFGRn (n = 0 ~ 15) to enable the corresponding pin de-bounce function and configure
the DBnCNT field in the EXTICFGRn so as to select an appropriate de-bounce time for specific
applications. The interrupt signal will however be delayed due to the de-bounce function. When
the device is woken up from the power saving mode by an external interrupt, an interrupt request
will be generated by the EXTI wakeup flag. After the device has been woken up and the clock
has recovered, the EXTI wake-up flag that was triggered by the EXTI line must be read and then
cleared by application software. The accompanying diagram shows the relationship between the
EXTI input signal and the EXTI interrupt/event request signal.
nINT
pin input
nINT
interrupt
request
Figure 24. EXTI Interrupt Debounce Function
Rev. 1.10
Low pulse is
shorter than
debounce time
Debounce
time delay
142 of 366
November 09, 2018
Need help?
Do you have a question about the HT32F52220 and is the answer not in the manual?