I am using the LPCxpresso 54628 board and have a question regarding lpcxpresso54628_rtos_examples_freertos_usart that I am testing. The (pooling) example runs fine but I want to add a timeout when nothing is received for a certain amount of time. The plan is to send a status request via USART Tx and if nothing is received (from a slave device2) within a time period then the device2 is declared dead and USART Tx continues to request status from other devices. If a status is received from device2 then the info is parsed and thereafter USART Tx continues to request status from other devices.
My question is what is the best method (resource vise) to implement a timeout in this FreeRTOS USART example when nothing is received?
The example mentioned is attached below for reference.
Thank you for any help.