
CH32V003
Reference Manual
V1.3
33
29
15
programmable
ADC
ADC global Interrupt
0x00000074
30
16
programmable
I2C1_EV
I2C1 event interrupt
0x00000078
31
17
programmable
I2C1_ER
I2C1 error interrupt
0x0000007C
32
18
programmable
USART1
USART1 global interrupt
0x00000080
33
19
programmable
SPI1
SPI1 global Interrupt
0x00000084
34
20
programmable
TIM1BRK
TIM1 brake interrupt
0x00000088
35
21
programmable
TIM1UP
TIM1 update interrupt
0x0000008C
36
22
programmable
TIM1TRG
TIM1 triggers an interrupt
0x00000090
37
23
programmable
TIM1CC
TIM1 captures the compare interrupt
0x00000094
38
24
programmable
TIM2
TIM2 global interrupt
0x00000098
6.4 External interrupt and event controller (EXTI)
6.4.1 Overview
Figure 6-1 External interrupt (EXTI) interface block diagram
AMBA APBbus
Peripheral interface
Pending
request
register
Interrupt
mask
register
Software
interrupt
event
register
Rising
trigger
selection
register
Falling
trigger
selection
register
PCLK2
10
10
10
10
10
Pulse
generator
Event
mask
register
Edge detect
circuit
To NVIC interrupt
controller
10
10
10
10
10
10
10
10
Input
Line
As can be seen from Figure 6-1, the trigger source of the external interrupt can be either a software interrupt
(SWIEVR) or an actual external interrupt channel. The signal of the external interrupt channel will be screened
by the edge detect circuit first. Whenever one of the software interrupt or external interrupt signals is generated,
it will be output to two with-gate circuits, event enable and interrupt enable, through the or-gate circuit in the
figure, as long as an interrupt is enabled or an event is enabled, an interrupt or an event will be generated. six
registers of EXTI are accessed by the processor through the APB2 interface.
6.4.2 Wake-up event
The system can wake up the Sleep mode caused by the WFE command through a wake-up event. The wake-
up event is generated by either of the following two configurations.
l
Enabling an interrupt in a peripheral register, but not enabling this interrupt in the PFIC of the core, and
enabling the SEVONPEND bit in the core at the same time. Embodied in EXTI, it is to enable an EXTI
interrupt, but not to enable the EXTI interrupt in PFIC, and to enable the SEVONPEND bit at the same
time. When the CPU wakes up from WFE, it needs to clear the EXTI interrupt flag bit and the PFIC