AnsweredAssumed Answered

LPCxpresso FreeRTOS USART receive timeout

Question asked by primate on Jan 7, 2018
Latest reply on Jan 10, 2018 by primate

Hello,

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? 

 

I have found quite a bit of questions around this matter but non of them have a solid straight answer. The closest I found is here (in spanish I think) and here (does not use FreeRTOS). 

 

The example mentioned is attached below for reference.

 

Thank you for any help.

Outcomes