External Interrupt
Trigger the downstream function-call subsystem from an Interrupt Service Routine
Since R2021a
Libraries:
Simulink Coder Support Package for STMicroelectronics Nucleo Boards /
Common
Embedded Coder Support Package for STMicroelectronics STM32 Processors /
STM32F746G-Discovery
Embedded Coder Support Package for STMicroelectronics STM32 Processors /
STM32F769I-Discovery
Embedded Coder Support Package for STMicroelectronics STM32 Processors /
STM32L475VG-Discovery (B-L475E-IOT01A)
Description
The External Interrupt block configures Simulink® to treat the downstream Function-Call Subsystem, connected to the output port of the block, as an Interrupt Service Routine (ISR). ISR is a section of code that the CPU triggers when the selected interrupt occurs at the selected pin of the hardware.
During simulations you can provide an input to the External Interrupt block by
connecting a boolean signal from the Simulink library to the input port of the External Interrupt block. If selected
Trigger type
edge is detected in the boolean input, the block
triggers the downstream function-call subsystem. If you do not provide an input, the
block triggers the downstream function-call subsystem until the simulation continues to
run. During code generation, any simulation block that is connected to the input port of
the External Interrupt block is ignored and has no effect on the generated code.
Note
We recommend that you use the External Interrupt block only in the parent model in a model hierarchy. For more information, refer to Model References.
Ports
Input
Output
Parameters
Extended Capabilities
Version History
Introduced in R2021a