HAL_Uart_Receive is Receiving only one byte, even the size is >1.
Hello,
Am using STM32F407 (Discovery board). This is connected with a PC which is sending 100 bytes of data and realized that only 1 byte is received and remaining 99 bytes are lost. Below is the code excerpt running on STM32F407
ret = HAL_UART_Receive(&huart6, &ins_data[i],10,10);
if(ret == HAL_OK)
{
rx_bytes++;
i++;
}
I do not want to use DMA but if data is available consume the data.
In the above code we are transmitting 100 bytes from PC.But at the end it is receiving only one byte,even the size is >1, and that one is only first byte of the transmitted bytes always.
We checked the ORE bit in CR1 register it is changed from 0 to 1, So at the receiving side after receiving of first byte other bytes are ready to receive,And every time after one received byte it enters into HAL_TIMEOUT error.
we are transmitting the data at high frequency so we do not want to loss the data.
Is there any other posibilities to receive the data according to our requirement without using Urat_DMA.
