Part Number:TMS320F28027
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.