Modeling and Code Generation Using Hardware Interrupt
Use the Hardware Interrupt block to create an interrupt service routine (ISR) automatically in the generated code of your model. The ISR executes the downstream function-call subsystem associated with event ports of the block.
C2000™ Microcontroller Blockset provides 3 workflows to configure the interrupts and generate code in Simulink®.
Modeling and Code generation using Hardware Interrupt
In this workflow, you can configure interrupts using CPU and PIE numbers. For more, see C28x Hardware Interrupt
This workflow is used for flat model approach.
C28x Hardware Interrupt block can be used in model config set reference.
No event selection capability is available.
On using C28x Hardware Interrupt block, the task priority order is negative. Lower priority value indicates a higher priority task.
Modeling and Code Generation Using Hardware Interrupt and Hardware Mapping
Hardware Interrupt blocks allows you to configure the interrupts along with the source triggers using the Hardware Mapping tool. For more information, see Configure Interrupts and Events Using Hardware Mapping
Data of Hardware Interrupt block is stored as part of the reference config set and hence reference config set cannot be used.
Multiprocessor Modeling and Code Generation Using Task Manager and Hardware Mapping
Task manager can be used in multiprocessor modeling approach, where task in a particular core is implemented using Model block.
In multiprocessor modeling approach, higher priority value indicates a higher priority task. Navigate to Configuration Parameters > Solver > Tasking and sample time options and enable the Higher priority value indicates a higher priority task.
Event configuration for hardware interrupts other than the default event does not work with task manager.