41
/
838
Nations Technologies Inc.
Tel
:
+86-755-86309900
:
Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North.
Nanshan District, Shenzhen, 518057, P.R.China
Figure 2-1 External interrupt/event controller block diagram
2.2.3
Functional description
EXTI contains 21 interrupt lines, of which 16 are from I/O pins and 5 are from internal peripherals or modules. To
generate an interrupt, the NVIC interrupt channel of the external interrupt controller must be configured to enable
the corresponding interrupt line. Select the type of rising edge, falling edge or double edge trigger event through edge
trigger configuration registers EXTI_RT_CFG and EXTI_FT_CFG, and write '1' to the corresponding bit of the
interrupt mask register EXTI_IMASK to open the interrupt request. When the preset edge trigger polarity is detected
on the external interrupt line, an interrupt request will be generated and the corresponding Pending bit will be set to
'1'. Writing '1' in the corresponding bit of the Pending register will clear the interrupt request.
To generate an event, the corresponding event line must be configured and enabled. According to the required polarity
of edge detection, set the rising/falling edge trigger configuration register, and write '1' in the corresponding bit of
the event mask register to allow the interrupt request. When the preset edge occurs on the event line, an event request
pulse will be generated, and the corresponding Pending bit will not be set to '1'.
In addition, by writing '1' in the software interrupt/event register, an interrupt/event request can also be generated by
software.
AMBA APB BUS
peripheral interface
Falling edge
triggers
configuration
register
Rising edge
triggers the
configuration
register
Software
interrupt
event
register
Request to
suspend
register
Interrupt
masking
register
Edge detection circuit
Event
masking
register
Pulse
generator
PCLK2
Input
Connect the NVIC
interrupt controller
32
32
32
32
32
21
21
21
21
21
21
21
21
21