UART reception error
Hello,
I am using Nucleo f446re board to interface with a sensor over UART. sensor is able to send the response data frame over rx line to mcu as mcu sends uart frame.
This transaction or data transfer is visually verified using logic analyser.
Actual issue is stm 32 is not able to capture the response packet.
Could you please assist to fix it.
Sensor sends 3 byte response frame. 0x08-0x00-0x0A
But mcu reads it as 0x00-0x08-0x00
Let me know if you need more information.
if (HAL_UART_Transmit (dev->uartHandle, (const uint8_t *)&txReadBuff, sizeof (txReadBuff), 5)!=HAL_OK)
return HAL ERROR:
if (HAL_UART_Receive (dev->uartHandle, (uint8_t *) &ackBuff, sizeof(ackBuff), 5)!=HAL_OK)
return HAL ERROR
AckBuff is an array of 3 bytes / uint8_t type.
Edited to apply source code formatting - please see How to insert source code for future reference.
