TI中文支持网
TI专业的中文技术问题搜集分享网站

关于C2000串口ScibRegs.SCIRXST.bit.RX ERROR疑问

本人没有使用FIFO功能。配置如下

ScibRegs.SCICCR.all =0x0007; // 1 stop bit, No loopback
// No parity,8 char bits,
// async mode, idle-line protocol
ScibRegs.SCICTL1.all =0x0003; // enable TX, RX, internal SCICLK,
// Disable RX ERR, SLEEP, TXWAKE
ScibRegs.SCICTL2.bit.TXINTENA =1;
ScibRegs.SCICTL2.bit.RXBKINTENA =1;
ScibRegs.SCIHBAUD = 0x00;//0x0000; LSPCLK=90M/4=22.5M
ScibRegs.SCILBAUD = 0x92;//SCI_PRD; Baud = LSPCLK/(baud*8) = 22.5M/(0x0493 * 8) = 2400

ScibRegs.SCIPRI.all = 0x10;
ScibRegs.SCICTL1.all =0x0023; // Relinquish SCI from Reset

手册有提到

the SCIRXST register has two interrupt flag bits
(RXRDY and BRKDT), plus the RX ERROR interrupt flag which is a logical OR of the FE, OE, BRKDT,
and PE conditions.

RX ERROR interrupt不被使能,但是由于就收中断和BRKDT中断使能公用一个使能位ScibRegs.SCICTL2.bit.RXBKINTENA =1;所以

我在接收中断中有特殊处理 BRKDT位,如下

if(ScibRegs.SCIRXST.bit.BRKDT)
{
ScibRegs.SCICTL1.bit.SWRESET=0;

}

ScibRegs.SCICTL1.bit.SWRESET=1;

我的疑问是如果是其他的错误产生了,比如FE, OE, BRKDT,
and PE conditions.那么我上述的只是处理了BRKDT的条件软件复位,那么串口还能正常工作吗?会不会死在中断?

求TI专家权威正解

赞(0)
未经允许不得转载:TI中文支持网 » 关于C2000串口ScibRegs.SCIRXST.bit.RX ERROR疑问
分享到: 更多 (0)