Hi primate,
1. What is the best method (resource vise) to implement a timeout in this FreeRTOS USART example when nothing is received?
I think you can add another tickless Task, check the tickcount, if your timeout happens, the UART still didn't receive the data which you want, you can do the other things you want, about the tickcount get, you can refer to the freertos_tickless project.
2. You said:
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.
I need to tell you that, to the UART, UART is connect to one to one, it can't be one to more than two, unless you use more than one UART modules.
Wish it helps you!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------