Timeouts for a specific task | Error correction | Architectural advice
Posted: Sun Feb 02, 2020 7:32 am
Looking for some architectural advice here if anything.
I'm writing an application that uses the UART libraries to communicate with another 3rd party piece of hardware over RS485. There is one particular binary API that I'm calling which returns in the hundreds of KB of data over the 9600 baud serial interface. There is no structure to the message's that I'm receiving other than "More messages" and "last message".
At times, the transfer will fail at "More messages" in that the 3rd party RS485 interface just decides to stop sending.
I currently have a task and queue which handles messages and holds a Semaphore whilst it's writing this data to file, so other functions cant read it until it's done. However during one of these failures the Sempahore isn't getting released - is there a way (without spinning up another watchdog task) to make a task like this timeout at the queue receive block?
I'm writing an application that uses the UART libraries to communicate with another 3rd party piece of hardware over RS485. There is one particular binary API that I'm calling which returns in the hundreds of KB of data over the 9600 baud serial interface. There is no structure to the message's that I'm receiving other than "More messages" and "last message".
At times, the transfer will fail at "More messages" in that the 3rd party RS485 interface just decides to stop sending.
I currently have a task and queue which handles messages and holds a Semaphore whilst it's writing this data to file, so other functions cant read it until it's done. However during one of these failures the Sempahore isn't getting released - is there a way (without spinning up another watchdog task) to make a task like this timeout at the queue receive block?