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.

CCS/TMS320F28027: SCI interrupt is not working

Part Number: TMS320F28027
Other Parts Discussed in Thread: C2000WARE

Tool/software: Code Composer Studio

Hi ,

   I am using two TMS320F28027 processors in my project. One is used for main control and the other for display control. I am using SCI communication protocol. I am able to receive data by poling in the main program, If I change the data reception through the interrupt, it is not working. 

I am using below instructions in the main program,

// Register interrupt handlers in the PIE vector table
//
PIE_registerPieIntHandler(myPie, PIE_GroupNumber_9, PIE_SubGroupNumber_1, (intVec_t)&sciaRxFifoIsr);

// Enable interrupts required for this example

//
PIE_enableInt(myPie, PIE_GroupNumber_9, PIE_InterruptSource_SCIARX);
CPU_enableInt(myCpu, CPU_IntNumber_9);

I am using below initialization for GPIO.

GPIO_setPullUp(myGpio, GPIO_Number_28, GPIO_PullUp_Enable);
GPIO_setPullUp(myGpio, GPIO_Number_29, GPIO_PullUp_Disable);
GPIO_setQualification(myGpio, GPIO_Number_28, GPIO_Qual_ASync);
GPIO_setMode(myGpio, GPIO_Number_28, GPIO_28_Mode_SCIRXDA);
GPIO_setMode(myGpio, GPIO_Number_29, GPIO_29_Mode_SCITXDA);

void scia_init1()
{
CLK_enableSciaClock(myClk);

//
// 1 stop bit, No loopback, No parity,8 char bits, async mode,
// idle-line protocol
//
SCI_disableParity(mySci);
SCI_setNumStopBits(mySci, SCI_NumStopBits_One);
SCI_setCharLength(mySci, SCI_CharLength_8_Bits);
SCI_enable(mySci);
SCI_enableRx(mySci);
SCI_enableRxInt(mySci);

//SCI BRR = LSPCLK/(SCI BAUDx8) - 1
#if (CPU_FRQ_60MHZ)
SCI_setBaudRate(mySci, (SCI_BaudRate_e)194);
#elif (CPU_FRQ_50MHZ)
SCI_setBaudRate(mySci, (SCI_BaudRate_e)162);
#elif (CPU_FRQ_40MHZ)
SCI_setBaudRate(mySci, (SCI_BaudRate_e)129);
#endif


}


//
// scia_fifo_init - Initialize the SCI FIFO
//
void scia_fifo_init()
{
SCI_enableFifoEnh(mySci);
SCI_resetChannels(mySci);
SCI_resetRxFifo(mySci);
SCI_clearRxFifoInt(mySci);
SCI_setRxFifoIntLevel(mySci, SCI_FifoLevel_1_Word);
return;
}

//
// sciaRxFifoIsr -
//
interrupt void sciaRxFifoIsr(void)
{
while(SCI_getRxFifoStatus(mySci) == SCI_FifoStatus_Empty)
{

}

//
// Check received character
//
ReceiveChar = SCI_getData(mySci);
ChartoDigit();
Displayscreen();

/* //
// Clear Overflow flag
//
SCI_clearRxFifoOvf(mySci);*/

//
// Clear Interrupt flag
//
SCI_clearRxFifoInt(mySci);

//
// Issue PIE ack
//
PIE_clearInt(myPie, PIE_GroupNumber_9);

return;
}

Please let me know, Why I am not able to receive through the interrupt?

Regards,

Mahesh K.R.

  • Kodakkattil,

    In general, we do not review or debug user code, but we will provide assistance to you with specific issues relating to our devices and development tools. This includes clarifying the behavior of any bit, register, or features when designing with our devices. Please note that all peripherals have example code in C2000Ware. We suggest comparing your code to the example code to determine where the problem may exist. It is recommended to follow standard and logical debugging techniques. Please continue to debug your code and feel free to use this forum to ask specific questions. The more specific the question, the better we can assist you.

    Specifically, I suggest comparing you code to:
    C:\ti\c2000\C2000Ware_<version>\device_support\f2802x\examples\drivers\scia_loopback_interrupts

    Also, I suggest consider using the 'structs' version of the examples (i.e. header files), as these are more widely supported.

    I hope this helps. If this answers your question, please click the green "Verified Answer" button. Thanks.

    - Ken
  • Hi,

     Is there some one who experienced similar issue and resolved? Please support me.

    Regards,

    Mahesh K.R.

  • Mahesh,

    You can try searching the E2E, but there is very little support for the F2802x drivers. Again, I strongly suggest using the peripheral register header files instead.

    - Ken