Part Number: TMS320F28384D
Hello,
In my project, I have a periodic ADC interruption that triggers two tasks: a CPU1 task and a CLA1 task. This is what the functions look like:
__interrupt void INT_myADC0_1_ISR()
{
// Cla1Task1() is triggered in the background
// Clearing interrupt:
ADC_clearInterruptStatus(ADCA_BASE, ADC_INT_NUMBER1);
Interrupt_clearACKGroup(INT_myADC0_1_INTERRUPT_ACK_GROUP);
// Pulse LED before and after CPU1_task():
Pulse_LED();
CPU1_task();
Pulse_LED();
}
__interrupt void cla1Isr1()
{
// CLearing interrupt:
Interrupt_clearACKGroup(INT_myCLA01_INTERRUPT_ACK_GROUP);
// Pulse LED twice in a row to detect end of Cla1Task1():
Pulse_LED();
Pulse_LED();
}
CPU1_task() is much longer than Cla1Task1(), but when I look at the LED signal, the two pulses that indicate the end of Cla1Task1() always happen after CPU1_task1().
Instead of triggering Cla1Task1() automatically from the ADC interruption, I also tried using CLA_forceTasks(CLA1_BASE,CLA_TASKFLAG_1) explicitely before I call CPU1_task(), but I get the same results.
It looks like Cla1Task1() won't be executed until the end the of the INT_myADC0_1_ISR() function. I also tried disabling the compiler optimizations, but it made no difference (the taks take a bit longer to get executed, but the CLA task is still executed after the CPU task). Could this be a priority issue?
Thank you!