![Geehy SEMICONDUCTOR APM32F405 Series Скачать руководство пользователя страница 122](http://html1.mh-extra.com/html/geehy-semiconductor/apm32f405-series/apm32f405-series_user-manual_573630122.webp)
www.geehy.com Page 121
Table 46 "External Interrupt and Event" Classification and Difference Points
Name
Trigger source
Configuration and execution process
External
hardware
interrupt
External signal
(1) Set the trigger mode, allow the interrupt request, and enable
corresponding peripheral interrupt line (enable in NVIC);
(2) When an edge consistent with the configuration is generated
on the external interrupt line, an interrupt request will be generated,
and the corresponding suspend bit will be set to 1. Write 1 to the
corresponding bit of the pending register and the interrupt request
will be cleared.
External
hardware
event
External signal
(1) Set the trigger mode and enable the event line;
(2) When an edge consistent with the configuration is generated
on the external event line, one event request pulse will be
generated, and the corresponding pending bit will not be set to 1.
External
software
request
Software interrupt
register/transmission
event (SEV)
instruction
(1) Enable the event line;
(2) Write 1 to the software interrupt event register of the
corresponding event line to generate an event request pulse, and
the corresponding pending bit will not be set to 1.
External
software
interrupt
Software interrupt
register
(1) Allow interrupt request, and enable the corresponding
peripheral interrupt line (enable in NVIC);
(2) Write 1 to the software interrupt event register of the
corresponding interrupt line to generate an interrupt request, the
corresponding pending bit will be set to 1; write 1 to the
corresponding bit of the pending register and the interrupt request
will be cleared.
Core wake-up
Using WFI and WFE instructions can make the core stop working. When WFI
instruction is used, any interrupt can wake up the core; when WFE instruction is
used, the core can be awakened up by event.
When interrupt is used for wake-up, the interrupt handler function will be
triggered, and normal interrupt configuration can wake up the core. When an
event is used to wake up the core, the interrupt handler function will not be
triggered, which will reduce the wake-up time, and the configuration method is:
It can trigger an internal interrupt (internal hardware event) but cannot
trigger the interrupt handler function for wake-up
It can enable an internal interrupt in the peripheral, but cannot enable
the corresponding interrupt in NVIC to avoid triggering the interrupt
handler function
Enable SEVONPEND bit in the system controller of the core, and
execute WFE instruction to make the core enter sleep mode