External Interrupt
Trigger downstream function-call subsystem from interrupt service routine
Libraries:
Raspberry Pi Blockset /
Basic
Description
The External Interrupt block triggers a downstream Function-Call Subsystem (Simulink) from an interrupt service routine (ISR). The Function-Call Subsystem (Simulink) should be connected to the output port of the External Interrupt block. An ISR is a section of code triggered by the Raspberry Pi® kernel when the interrupt occurs at the hardware pin you specify.
During simulation, you can provide an input to the External Interrupt block
by connecting a source block from the Simulink® library to the input port of the External Interrupt block. The
External Interrupt block receives an input value of 0 or
1 at each time step. When the input at the block port is
1, the block triggers the downstream function-call subsystem (Simulink). When the input at the block port is
0 or when no source of input is connected to the input port of the block,
the block does not trigger the downstream function-call subsystem (Simulink). During code
generation, any Simulink block connected to the input port of the External Interrupt block
is ignored and has no effect on the generated code.
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 (Simulink).
Note
To generate code C/C++ code for this block, you must have an Embedded Coder® license.
Examples
Ports
Input
Output
Parameters
Extended Capabilities
Version History
Introduced in R2021a
See Also
Model References (Simulink) | Function-Call Subsystem (Simulink)

