Timeouts for a specific task | Error correction | Architectural advice

alexturner
Posts: 4
Joined: Tue Oct 29, 2019 12:23 pm

Timeouts for a specific task | Error correction | Architectural advice

Postby alexturner » 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?

ESP_Sprite
Posts: 9757
Joined: Thu Nov 26, 2015 4:08 am

Re: Timeouts for a specific task | Error correction | Architectural advice

Postby ESP_Sprite » Mon Feb 03, 2020 9:44 am

That's very hard to answer without looking at the code, I think.

Who is online

Users browsing this forum: Bing [Bot] and 410 guests