DSP6748用户手册有提到在设置为FIFO模式下,发送的THR寄存器是16个字节的FIFO。然而,在Starterware库中却仅提供了一次发送只能一个字节的库函数(UARTCharPutNonBlocking)。如若尝试连续地调用该库函数,将导致导致部分的字节发送失败(因为库函数正确使用前提是FIFO为空)。试问是否有库函数支持一次连续发送多个字节,以充分发挥FIFO队列的优势(即FIFO不为空,但也不满的情况下发送字节)?
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.
DSP6748用户手册有提到在设置为FIFO模式下,发送的THR寄存器是16个字节的FIFO。然而,在Starterware库中却仅提供了一次发送只能一个字节的库函数(UARTCharPutNonBlocking)。如若尝试连续地调用该库函数,将导致导致部分的字节发送失败(因为库函数正确使用前提是FIFO为空)。试问是否有库函数支持一次连续发送多个字节,以充分发挥FIFO队列的优势(即FIFO不为空,但也不满的情况下发送字节)?
按照手册来看只要发送fifo为空就会触发中断,并且当THR写入一个字符就会清除中断。看一下Table 30-11. Interrupt Identification and Interrupt Clearing Information
建议试一下DMA传输,当发送fifo为空时,uart会发送UTXEVT给EDMA,作为应答,EDMA会重新填满FIFO.
Transmit event (UTXEVT): When the transmitter FIFO is empty (when the last byte in the transmitter
FIFO has been copied to the transmitter shift register), the UART sends an UTXEVT signal to the
EDMA controller. In response, the EDMA controller refills the transmitter FIFO by way of the transmitter
holding register (THR).