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.

请教原因 2082x串口SCI不能发送数据

SCI_disableParity(obj->sciHandle);
SCI_setNumStopBits(obj->sciHandle,SCI_NumStopBits_One);
SCI_setCharLength(obj->sciHandle,SCI_CharLength_8_Bits);
SCI_enableTx(obj->sciHandle);
SCI_enableRx(obj->sciHandle);
SCI_enableTxInt(obj->sciHandle);
SCI_enableRxInt(obj->sciHandle);

SCI_setBaudRate(obj->sciHandle,SCI_BaudRate_19_2_kBaud);
SCI_enable(obj->sciHandle);

SCI_enableTxFifoEnh(obj->sciHandle);

SCI_resetTxFifo(obj->sciHandle);
SCI_clearTxFifoInt(obj->sciHandle);
SCI_resetChannels(obj->sciHandle);
SCI_setTxFifoIntLevel(obj->sciHandle, SCI_FifoLevel_Empty);

SCI_resetRxFifo(obj->sciHandle);
SCI_clearRxFifoInt(obj->sciHandle);
SCI_setRxFifoIntLevel(obj->sciHandle, SCI_FifoLevel_4_Words);

上面是配置程序

void scia_xmit(HAL_Handle handle,uint16_t a)
{

HAL_Obj *obj = (HAL_Obj *)handle;
while(SCI_getTxFifoStatus(obj->sciHandle) != SCI_FifoStatus_Empty)
{
}

SCI_putDataBlocking(obj->sciHandle, a);
}

这是发送程序

但SCICTL2的 TXRDY位一直是0,表示SCITXBUF is full。

所以一直发不了数据,为什么呢 :-)