F2838x-M4 Hardware Interrupt
Trigger downstream function-call subsystem from interrupt service routine
Since R2020b
Libraries:
C2000 Microcontroller Blockset /
F2838x /
M4
C2000 Microcontroller Blockset /
F28M35x /
M3
C2000 Microcontroller Blockset /
F28M36x /
M3
C2000 Microcontroller Blockset /
Scheduling
Description
Use the F2838x-M4 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 the block.
Using this block you can:
Create ISRs on TI C2000 ARM Cortex-M4.
Set ISR priority.
Enable or disable interrupt preemption.
Simulate the trigger of the interrupt and the downstream subsystem using a simulation input.
This block generates code only for the specified ISR. To change the configuration to enable the interrupt and specific triggering options use the settings of the chosen peripheral.
For example, to create an ISR for the UART peripheral on the Hardware Interrupt block,
select UART
in the Interrupt group parameter and
UART0INT_Handler
in the Interrupt name parameter.
To create an ISR on the UART Transmit and the UART Receive blocks, set the
Interrupt name parameter to
UART0INT_Handler
.
To trigger an ISR from a UART Transmit block, select the Enable Transmit Interrupt check box in Configuration Parameters > Hardware Implementation > Target Hardware Resources > UART. Selecting this check box has no effect if your model does not have a UART Transmit block.
An ISR from a UART Receive block is automatically triggered when you choose the necessary Hardware Interrupt block settings because the Enable Receive Interrupt check box is selected by default in Configuration Parameters > Hardware Implementation > Target Hardware Resources > UART.
Note
Use MCAN Interrupt Status block inside the interrupt function call subsystem to clear the source of interrupt.
Ports
Input
Output
Parameters
Version History
Introduced in R2020b