Hi !
My application on c6678 reads data from UART using this code:
int getMsgFromUART(uint8_t *buff)
{
uint8_t ch = 0x00;
if (UartReadData(&ch, 1000000) == 0)
{
*buff = ch;
return 0;
}
return 1;
}
where UartReadData function is:
UART_STATUS UartReadData(uint8_t *buf, uint32_t delay)
{
uint32_t delayCount = delay;
while( (UartIsDataReady()) != 1)
{
if (--delayCount > 0) asm (" nop ");
else
{
*buf = CSL_FEXT(hUartRegs->RBR, UART_RBR_DATA);
return ( (UART_STATUS) UART_EFAIL);
}
}
*buf = CSL_FEXT(hUartRegs->RBR, UART_RBR_DATA);
return ( (UART_STATUS) UART_EOK);
}
Here UartIsDataReady is:
int UartIsDataReady(void)
{
int DR_val = 0;
if (CSL_UART_LSR_DR_READY == (CSL_FEXT(hUartRegs->LSR, UART_LSR_DR))) {
DR_val = 1;
}
return (DR_val);
}
But I found that I cannot read sequencies longer than 20 symbols. Probably the UART buffer size is limited by 20 symbols. How to increase the UART buffer ?