AnsweredAssumed Answered

HAL_UART_Receive_IT timeout

Question asked by Steven Bébin on May 14, 2018



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 [0]! = 0x02);