C29x Hardware Interrupt
Trigger downstream function-call subsystems from interrupt service routine
Since R2025a
Libraries:
C2000 Microcontroller Blockset /
F29H85x
Description
Use the Hardware Interrupt block to create an interrupt service routine (ISR) automatically in the generated code of your model to react to the events selected. The ISR executes the downstream function-call subsystem associated with event ports of the block.
The function call subsystem associated with the event output port run at same priority as that of ISR priority.
Using this block you can:
Create ISRs.
Set ISR priority.
Enable or disable interrupt preemption.
This block generates code only for the specified ISR and selected events. To change the configuration, enable the interrupt and specific triggering options use the settings of the chosen peripheral.
For example, to create an ISR for the ADC peripheral on the Hardware Interrupt block:
Model must have an Analog to digital Converter (ADC) block.
Select
Analog to digital converter (ADC)
in the Interrupt group parameter andADCA#_INT
in the Interrupt name parameter from the hardware interrupt block.Select
EOC event
orOverflow event
event name in the Events to serve parameter.
To know more about when not to use the custom event, refer to Limitations (Embedded Coder).
Ports
Output
Parameters
Limitations
Custom events should not be used, when interrupt or event generation is selected from the block or configuration parameter. You might observe that the generated code when executed on the hardware board can get stuck infinitely in the Hardware Interrupt service routine. Ensure that the supported event generation from the block should not be enabled when using the supported event as custom event.
Also, ensure that enabling of custom event should not be part of initialize subsystem. It should executed during run time.
Version History
Introduced in R2025a