| Embedded IDE Link™ CC | ![]() |
Interrupt Service Routine to handle hardware interrupt (C5xxx and C6xxx)
Cxxxx DSP Chip Support in Embedded IDE Link™ CC
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 target that run the processes that are downstream from the this block or a Task block connected to this block.

Specify an array of interrupt numbers for the interrupts to install. The following table provides the valid range for C5xxx and C6xxx processors:
| Processor Family | Valid Interrupt Numbers |
|---|---|
| C5xxx | 2, 3, 5-21, 23 |
| C6xxx | 4-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.
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 the proper rate transition code (refer to Rate Transitions and Asynchronous Blocks). The task priority values are also required to ensure 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.
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.
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.
![]() | C281x Hardware Interrupt | Idle Task | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |