Hi,
I am using KSDK 1.3 with KDS 3.2 and I am struggling to receive a variable size array of bytes. I only receive one byte and I cannot get the rest of the array.
I used the function static inline uint8_t UART_HAL_GetRxFifoSize(UART_Type * base) and it returned 0x0 which means only one word in the buffer.
I did not find a way to change it and use UART_DRV_ReceiveData or UART_DRV_ReceiveDataBlocking for a greater number of bytes.
How can I solve it?
Thanks in advance
Daniel Chen,
did you find any reference about this?
We have uart demos under the KSDK installation folder, you can refer to it.
KSDK_1.3.0\examples\frdmkv31f\driver_examples\uart\
You need to specify the number of data words that you going to receive before it can continue
For example, for uart_blocking example, the specified number is 1.
// Send/receive blocking function
while(true)
{
// Wait to receive input data
if (kStatus_UART_Success == UART_DRV_ReceiveDataBlocking(BOARD_DEBUG_UART_INSTANCE, &rxChar, 1u, OSA_WAIT_FOREVER))
{
// Echo received character
UART_DRV_SendDataBlocking(BOARD_DEBUG_UART_INSTANCE, &rxChar, 1u, 1000u);
}
}
Hi:
Sorry I lost tracking of this thread.
From the KV31 reference manual, only uart0 contains 8-entry receive FIFOs, all other UARTs contains a 1-entry receive FIFOs.
Do you use uart0 or other?
Regards
Daniel
Hello Daniel,
I am using KV31F512.
Is there any problem regarding the API usage?