Nations Technologies Inc.
Tel
:
+86-755-86309900
:
Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North.
Nanshan District, Shenzhen, 518057, P.R.China
126
/
631
Figure 6-1 External interrupt/event controller block diagram
Functional description
EXTI contains 25 interrupts, 16 from I/O pins and 9 from internal modules. To generate interrupts, the NVIC interrupt
channel of the external interrupt controller must be configured to enable the appropriate interrupt line. Select rising
edge, falling edge, or double edge trigger event types by edge trigger configuration registers EXTI_RT_CFG and
EXTI_FT_CFG, and write '1' to the corresponding bit of interrupt masking register EXTI_IMASK to allow interrupt
requests. When a preset edge trigger polarity is detected on the external interrupt line, an interrupt request is generated
and the corresponding pending bit is set to '1'. Writing '1' to the corresponding bit of the pending register clears the
interrupt request.
To generate events, the corresponding event line must be configured and enabled. According to the desired edge
detection polarity, set up the rise/fall edge trigger configuration register, while writing '1' in the corresponding bit of
the event masking register to allow interrupt requests. When a preset edge occurs on an event line, an event request
pulse is generated and the corresponding pending bit is not set to '1'.
In addition, interrupt/event requests can also be generated by software by writing a '1' in the software interrupt/event
register.
AMBA APB BUS
peripheral interface
Falling edge
triggers
configuration
register
R ising 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
I nput
Connect the NVIC
interrupt controller
32
32
32
32
32
25
25
25
25
25
25
25
25
25