Main Content

Hardware Interrupt

Trigger downstream function-call subsystem from interrupt service routine

Since R2024b

  • Hardware Interrupt block

Libraries:
SoC Blockset / Processor Task Execution

Description

The Hardware Interrupt block triggers a task when an event occurs. The task must be associated with an event interrupt service routine. Once triggered, the task executes the downstream subsystem. When using IP Core Generation Workflow, this block is configured and placed in the generated software model.

Tip

To generate your software model, use the IP Core Generation Workflow instead of creating one manually and configuring the Hardware Interrupt parameters. The workflow configures the Hardware Interrupt block and places it in the generated model.

To associate the task with an interrupt event, use the Hardware Mapping app. To start the app, click Hardware Mapping on the block mask.

Ports

Input

expand all

The simulation-only message input acts as a pass-through and is reflected at the output. The port receives input from a function call.

Dependencies

To enable this port, select the Enable simulation port parameter.

Output

expand all

This port ties the interrupt trigger to a software task. The output is a function call.

Parameters

expand all

To edit block parameters interactively, use the Property Inspector. From the Simulink® Toolstrip, on the Simulation tab, in the Prepare gallery, select Property Inspector.

Specify the scheduling priority for the event-driven task between 1 and 99. Higher priority tasks preempt lower priority tasks. The task priority range is limited by the hardware attributes. For more information on task priority, see Task Priority and Preemption.

Specify the number of the processor core where a task executes. For more information on selecting cores and core execution visualizations, see Multicore Execution and Core Visualization.

To have the operating system dynamically assign a core to the task, set this value to -1.

Select this parameter to enable peripheral simulation. When selected, the block adds an input port for simulation.

Click this parameter to open the Hardware Mapping tool.

Version History

Introduced in R2024b