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.

TMS320F280260的SCI接口调试时,一直进入接收中断

Other Parts Discussed in Thread: CONTROLSUITE

原程序是这样的。但为什么会一直进入接收中断?RX口也配置有上拉!

我希望是接收到数据之后才进入中断,前辈有没有例子!

谢谢!

//
// sciaRxFifoIsr -
//
__interrupt void
sciaRxFifoIsr(void)
{
uint16_t i;
Count3++;
if(SCI_getRxFifoStatus(mySci) != SCI_FifoLevel_Empty)
{
Count4++;
for(i=0;i<2;i++)
{
Count5++;
//
// Read data
//
rdataA[i] = SCI_getData(mySci);
}

for(i=0;i<2;i++)
{
//
// Check received data
//
if(rdataA[i] != ( (rdata_pointA+i) & 0x00FF) )
{
error();
}
}

rdata_pointA = (rdata_pointA+1) & 0x00FF;
}

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

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

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

return;
}