1. One thing which really annoyed me is the UART_write function is not able to write more than 16 bytes in FIFO & interrupt mode.
Here is the code related to the problem:
while( 0 != ( fifosize--) )
{
CSL_FINS(hUart->uartRegs->THR,UART_THR_DATA,*pBuf);
pBuf++;
}
I don't know why TI did it that way. I tried to change the code a little bit to overcome it:
while (count > 0)
{
fifosize = ( count < 16 ) ? count : 16;
count -= fifosize;
while(!UART_getXmitHoldRegEmptyStatus(hUart));
while( 0 != ( fifosize--) )
{
CSL_FINS(hUart->uartRegs->THR,UART_THR_DATA,*pBuf);
pBuf++;
}
}
and now the UART_write function is working as it is supposed to. Could anyone tell me if there is any "potential" problem with that code?
2. Another question is related to the newest release of CSL. All instances of:
CSL_FINS(hUart->uartRegs->THR,UART_THR_DATA,*pBuf);
are replaced by
CSL_FSET(hUart->uartRegs->THR, 7, 0, (*pBuf)&CSL_UART_THR_DATA_MASK);
Does anybody know what's wrong with the former instruction? The former instruction works well to me but the newer one bring me trouble.
Thanks,
Joe