External Interrupt
Trigger downstream function-call subsystem from interrupt service routine
Since R2021a
Add-On Required: This feature requires the Simulink Support Package for Raspberry Pi Hardware add-on.
Libraries:
Simulink Support Package for Raspberry Pi Hardware /
Basic
Description
The External Interrupt block triggers a downstream Function-Call Subsystem from an interrupt service routine (ISR). The Function-Call Subsystem 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. 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. 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.
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
Version History
Introduced in R2021a