UART FIFO SUPPORT

Hi,

I have stuck with uart read; I'm sending data from another device via uart. 

I could read only 16 bytes of data If enable FIFO SUPPORT, it reads only 1 byte data in callback or read api If FIFO SUPPORTdisabled.

I don't understand the FIFO SUPPORT, can someone help why and where we need to use it?

why I always read only 16bytes of data, how can I overcome this issue to read more bytes?

It would be helpful if there is documentation/ test codes available.

fsp_err_t err = R_SCI_UART_Read (&g_uart0_ctrl,g_dest, 64);
if (FSP_SUCCESS != err)
{
APP_ERR_PRINT ("\r\n** R_SCI_UART_Read API Failed **\r\n");
return err;
}
while (!UART_EVENT_RX_COMPLETE)
{

}

void uart_callback(uart_callback_args_t *p_args)
{
/* Logged the event in global variable */
g_uart_event = (uint8_t)p_args->event;

switch (p_args->event)
{
/* Read all data provided by user until enter button is pressed */
case UART_EVENT_RX_CHAR:
{

if (UART_DATA_BITS_8 >= g_uart0_cfg.data_bits)
{
g_temp_buffer[g_counter_var++] = (uint8_t)(p_args->data ;
g_data_received_flag = true;

}
else
{
uint16_t * p_dest = (uint16_t *) &g_temp_buffer[g_counter_var];
*p_dest = (uint16_t) p_args->data;
g_counter_var += 2;
}

break;
}
case UART_EVENT_RX_COMPLETE:
{
uart_receive_complete = 1;
break;
}
/* Transmit complete */
case UART_EVENT_TX_COMPLETE:
{
uart_transfer_complete = 1;
break;
}
case UART_EVENT_TX_DATA_EMPTY:
break;
case UART_EVENT_ERR_OVERFLOW:
break;

default:
break;
}

Thanks,

Tarun

Parents Reply Children
No Data