Question
simultaneous transmit and receive for UART not possible?
Hi,
I am trying to set up UART communication on two STMF4 Boards, which has to handle simultaneous reception while also sending. The transmission looks something like this:
for (uint16_t i = 0; i < size; i++)
{
HAL_UART_Transmit(&huart3, (uint8_t*)packet + i, 1, HAL_MAX_DELAY);
if (RX_NOT_READY)
{
HAL_UART_Receive_IT(&huart_xcp, rx.w_ptr, 1);
}with this in receive:
if (HAL_UART_Receive_IT(&huart3, write_ptr, 1) != HAL_OK)
{
rxbuf.state = RX_NOT_READY;
}Seems to me like I can't block for any less time while transmitting. Nonetheless I am losing one or two of maybe 7 bytes, when I am transmitting at the same time.
My baudrate is 115200, changing it up or down doesn't have much effect.
