Yes, it is possible to set the priority of UART (SCI) transmit (Tx) and receive (Rx) interrupts for the TI F28379D microcontroller in Simulink. While the SCI_A setup window in Simulink may not directly expose priority settings, you can manage interrupt priorities using the C28x Hardware Interrupt block provided by the Embedded Coder Support Package for Texas Instruments C2000 Processors. Refer the steps given below to set it.
- Add the C28x Hardware Interrupt Block to your model.
- Configure the Interrupt Block
- Double-click the C28x Hardware Interrupt block to open its parameters.
- Set the Interrupt group number to correspond to the SCI module you're using:
- For SCI_A: Group 9
- For SCI_B: Group 9
- For SCI_C: Group 8
- Set the Interrupt number within the group:
- For SCI Rx: 1
- For SCI Tx: 2
- Assign a Task priority:
- Lower numerical values indicate higher priority.
- Ensure the priority value is less than 40 to allow preemption of the base rate task.
- Connect the output of this block to the subsystem or function that handles the interrupt service routine (ISR).
3. Ensure Proper Configuration
- Verify that the SCI module is properly initialized and configured elsewhere in your model.
- Ensure that the interrupt is enabled in the SCI control registers.
- Confirm that the PIE (Peripheral Interrupt Expansion) is enabled and properly configured.
Refer the MathWorks’ documentation for C28x Hardware Interrupt Block given below for better understanding:
I hope this helps!