AT32F425
Series Reference Manual
2022.03.30
Page 99
Ver 2.01
8
External interrupt/Event controller (EXINT)
8.1
EXINT introduction
EXINT consists of 22 interrupt lines EXINT_LINE[23:0], each of which can generate an interrupt or
event by edge detection trigger or software trigger. EXINT can enable or disable an interrupt or event
independently through software configuration, and utilizes different edge detection modes (rising edge,
falling edge or both edges) as well as trigger modes (edge detection, software trigger or both tirggers)
to respond to the trigger source in order to generate an interrupt or event.
Figure 8-1 External interrupt/Event controller block diagram
PAx(x=0~15)
EXINTx(x=0~15)
EXINT_LINE0-15
PBx(x=0~15)
PCx(x=0~15)
PDx(x=0~15)
PEx(x=0~15)
EXINT_LINE16-23
PVM output EXINT_LINE[16]
ERTC alarm EXINT_LINE[17]
OTGFS wakeup EXINT_LINE[18]
ERTC tamper and time stamp EXINT_LINE[19]
EXINT_LINE0-23
Rising
edge
Falling
edge
EXINT_POLCFG1[23:0]
EXINT_POLCFG2[23:0]
EXINT_SWTRG[23:0]
EXINT_INTEN[23:0]
Interrupt0-23
EXINT_EVTEN[23:0]
ERTC wakeup EXINT_LINE[20]
Main features:
EXINT 0~15 mapping IO can be configured independently
Independent trigger selection on each interrupt line
Independent enable bit on each interrupt
Independent enable bit on each event
Up to 22 software trigger that can be generated and cleared independently
Independent status bit on each interrupt
Each interrupt can be cleared independently.
8.2
Function overview and configuration procedure
With up to 22 interrupt lines EXINT_LINE[23:0], EXINT can detect not only GPIO external interrupt
sources but also six internal sources such as PVM output, ERTC alarm, OTGFS wakeup, RTC wakeup,
RTC tamper and time stamp events, RTC alarm and I2C1 wakeup events. The GPIO interrupt sources
can be selected with SCFG_EXINTCx register. It should be noted that these input sources are mutually
exclusive. For example, EXINT_LINE0 is allowed to select only one of PA0/PB0/PC0/PD0 pins, instead
of taking both PA0 and PB0 as the input sources at the same time.
EXINT supports multiple edge detection modes, including rising edge, falling edge or both edges,
selected by EXINT_POLCFG1 and EXINT_POLCFG2 register. Active edge trigger detected on the
interrupt line can be used to generate an event or interrupt.
Each of the EXINT lines is able to select a rising or falling edge detection, or both (rising and falling),
through the EXINT_POLCFG1 and EXINT_POLCFG2 registers. The active edge detection on an
interrupt line can generate an event or interrupt.
In addition, EXINT supports independent software trigger for the generation of an event or interrupt. This
is achieved by setting the corresponding bits in the EXINT_SWTRG register.
EXINT can enable or disable an interrupt or event individually through software configuration such as
EXINT_INTEN and EXINT_EVTEN register, indicating that the corresponding interrupt or event must be
enabled prior to either edge detection or software trigger.
EXINT also features an independent interrupt status bit. Reading access to EXINT_INTSTS register can
obtain the corresponding interrupt status. The status flag is cleared by writing “1” to this register.