This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS570LC4357: RTI Compare 1 interrupts not observed as being generated

Part Number: TMS570LC4357
Other Parts Discussed in Thread: HALCOGEN

Tool/software:

Hello,

We are new to the TMS570 RTI programming. We have configured, via HalCoGen (and generated code accordingly), the RTI as:

In our software running on the LaunchPad TMS570LC43x, after calling the 'rtiInit()' and '_enable_IRQ()' functions, we have the code as following:

void delayus(uint16 us)
{
if (us == 0)
return;


else
{
//CHANGE THE INTERRUPT COMPARE VALUES (PERIOD OF INTERRUPT)
//Setup compare 1 value.
rtiREG1->CMP[1U].COMPx = 10*us; //10 ticks of clock per microsecond, so multiply by 10
//Setup update compare 1 value.
rtiREG1->CMP[1U].UDCPx = 10*us;

//ENABLE THE NOTIFICATION FOR THE PERIOD WE SET
rtiEnableNotification(rtiREG1, rtiNOTIFICATION_COMPARE1);

//START THE COUNTER
rtiStartCounter(rtiREG1, rtiCOUNTER_BLOCK0);

//WAIT IN LOOP UNTIL THE INTERRUPT HAPPENS (HAPPENS AFTER THE PERIOD WE SET)
//WHEN INTERRUPT HAPPENS, RTI_NOTIFICATION GETS SET TO 1 IN THAT INTERRUPT
//GO TO notification.c -> rtiNotification() to see where RTI_TIMEOUT is set to 1
while(RTI_TIMEOUT==0);

//RESET THE VARIABLE TO 0, FOR THE NEXT TIME WE DO A DELAY
RTI_TIMEOUT = 0;

//DISABLE THE INTERRUPT NOTIFICATION
rtiDisableNotification(rtiREG1, rtiNOTIFICATION_COMPARE1);

//STOP THE COUNTER
rtiStopCounter(rtiREG1, rtiCOUNTER_BLOCK0);

//RESET COUNTER FOR THE NEXT TIME WE DO A DELAY
rtiResetCounter(rtiREG1, rtiCOUNTER_BLOCK0);
}

}

However, at run-time, we observed the software stuck at "while(RTI_TIMEOUT==0);", in other words, the 'rtiNotification' never gets executed with "rtiNOTIFICATION_COMPARE1" as one of its input parameters.

Please advise. Thank you.

John