I plan to take the data from a meter. It works.
I would now like to create a timeout on the HAL_UART_Receive_IT in case the wire connected to the meteris cut.
Is it possible to create a timeout for this function or are there other methods to achieve what I want to do?
do // Start of frame detection
HAL_UART_Receive_IT (& huart2, data, 1); // We recover a data
} while (data ! = 0x02);