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.

tms320f28027 用官方的例程 接收中断为什么要上位机发送2次数据才进入中断,附代码



interrupt void sciaRxFifoIsr(void)
{
Uint16 i;
for(i=0;i<2;i++)
{
rdataA[i]=SciaRegs.SCIRXBUF.all; // Read data
}
/*
for(i=0;i<2;i++) // Check received data
{
if(rdataA[i] != ( (rdata_pointA+i) & 0x00FF) ) error();
}
*/
rdata_pointA = (rdata_pointA+1) & 0x00FF;

SciaRegs.SCIFFRX.bit.RXFFOVRCLR=1; // Clear Overflow flag
SciaRegs.SCIFFRX.bit.RXFFINTCLR=1; // Clear Interrupt flag

PieCtrlRegs.PIEACK.all|=0x100; // Issue PIE ack
}