External Interrupt
Trigger the downstream function-call subsystem from an Interrupt Service Routine
- 库:
Simulink Coder Support Package for STMicroelectronics Nucleo Boards/ Common
Embedded Coder Support Package for STMicroelectronics Discovery Boards/ STM32F746G-Discovery
Embedded Coder Support Package for STMicroelectronics Discovery Boards/ STM32F769I-Discovery
Embedded Coder Support Package for STMicroelectronics Discovery Boards/ STM32L475-Discovery (B-L475E-IOT01A)
Description
TheExternal Interruptblock configures Simulink®to treat the downstreamFunction-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 selectedTrigger 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 theExternal Interruptblock only in the parent model in a model hierarchy. For more information, refer toModel References.