Skip to Main Content Skip to Search
Product Documentation

C5000/C6000 Hardware Interrupt - Interrupt Service Routine to handle hardware interrupt on C5000 and C6000 processors

Library

Embedded Coder/ Embedded Targets/ Processors/ Texas Instruments C5000/ Scheduling

Embedded Coder/ Embedded Targets/ Processors/ Texas Instruments C6000/ Scheduling

Description

Create interrupt service routines (ISR) in the software generated by the build process. When you incorporate this block in your model, code generation results in ISRs on the processor that run the processes that are downstream from the this block or a Task block connected to this block.

Dialog Box

Interrupt numbers

Specify an array of interrupt numbers for the interrupts to install. The following table provides the valid range for C5xxx and C6xxx processors:

Processor FamilyValid Interrupt Numbers
C5xxx2, 3, 5-21, 23
C6xxx4-15

The width of the block output signal corresponds to the number of interrupt numbers specified here. Combined with the Simulink task priorities that you enter and the preemption flag you enter for each interrupt, these three values define how the code and processor handle interrupts during asynchronous scheduler operations.

Simulink task priorities

Each output of the Hardware Interrupt block drives a downstream block (for example, a function call subsystem). Simulink software task priority specifies the Simulink priority of the downstream blocks. Specify an array of priorities corresponding to the interrupt numbers entered in Interrupt numbers.

Simulink task priority values are required to generate rate transition code (refer to Rate Transitions and Asynchronous Blocks). The task priority values are also required for absolute time integrity when the asynchronous task needs to obtain real time from its base rate or its caller. Typically, you assign priorities for these asynchronous tasks that are higher than the priorities assigned to periodic tasks.

Preemption flags preemptable – 1, non-preemptable – 0

Higher priority interrupts can preempt interrupts that have lower priority. To allow you to control preemption, use the preemption flags to specify whether an interrupt can be preempted.

Entering 1 indicates that the interrupt can be preempted. Entering 0 indicates the interrupt cannot be preempted. When Interrupt numbers contains more than one interrupt priority, you can assign different preemption flags to each interrupt by entering a vector of flag values, corresponding to the order of the interrupts in Interrupt numbers. If Interrupt numbers contains more than one interrupt, and you enter only one flag value in this field, that status applies to all interrupts.

In the default settings [0 1], the interrupt with priority 5 in Interrupt numbers is not preemptible and the priority 8 interrupt can be preempted.

Enable simulation input

When you select this option, Simulink software adds an input port to the Hardware Interrupt block. This port is used in simulation only. Connect one or more simulated interrupt sources to the simulation input.

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS