Hello,
I have an application which makes use of the following components:
- OTA functionality
- MQTT
- HTTP server
- HTTP client
In addition, the application may start three data producing tasks, depending on client configuration: Modbus RTU, Modbus TCP and UART.
I am not sure how to implement synchronization between the data producing tasks. One problem I’ve faced is that the Modbus serial taks experiences timeouts if other tasks (WiFi for example) are preempting it. My questions are:
- How can I implement synchronization between the producer tasks without knowing in advance if all of them will run? Using
xEventGroupSync()
looks like an option, but how can I use it without knowing which tasks will run? - How to ensure tasks run in order (1st, 2nd, 3rd and so on)
- How to stop these tasks during OTA
Thanks