Describe the bug
When reading sensor data using HAL_UART_Receive(), the buffer contains two instances of the first start character, 0x42.
This results in frequent checksum failures, possibly due to the extra start character shifting the indices of the checksum over.
To Reproduce
Read PMS5003 data using HAL_UART_Receive(&huart1, rx_buffer, 32, 1000)
Use the debugger to view the elements of rx_buffer
Expected behavior
Only one instance of 0x42 should be present, located at index 0 of the buffer array.
Describe the bug When reading sensor data using
HAL_UART_Receive()
, the buffer contains two instances of the first start character, 0x42. This results in frequent checksum failures, possibly due to the extra start character shifting the indices of the checksum over.To Reproduce Read PMS5003 data using
HAL_UART_Receive(&huart1, rx_buffer, 32, 1000)
Use the debugger to view the elements of rx_bufferExpected behavior Only one instance of 0x42 should be present, located at index 0 of the buffer array.