Serial Output in RTOS

Thread Starter

pauloDNS

Joined Jul 19, 2020
25
Hi, I work with ESP32, and in my work, I need to use always MQTT for communication, because this, I use a lot of freeRTOS for my application and I use both core, I have some trouble using Serial for debugging and communication, how would be a better way to use serial, in a queue or another task or use mutex?
 

Papabravo

Joined Feb 24, 2006
22,082
Normally I would expect to have 2 serial ports. One for application purposes and one for debugging which would normally be idle in an installed application. It would however be available for field debugging with the appropriate connector and off board tools.

I'm guessing you are asking about a situation where you have a single serial port, and you wish to use it for both purposes. There is a great deal of room for creativity here. Let me know if this is the case and something about the usual application traffic.
 

Thread Starter

pauloDNS

Joined Jul 19, 2020
25
Normally I would expect to have 2 serial ports. One for application purposes and one for debugging which would normally be idle in an installed application. It would however be available for field debugging with the appropriate connector and off board tools.

I'm guessing you are asking about a situation where you have a single serial port, and you wish to use it for both purposes. There is a great deal of room for creativity here. Let me know if this is the case and something about the usual application traffic.
Yes, because hardware, i need to use same port
 

Papabravo

Joined Feb 24, 2006
22,082
I'm not clear from what I know about MQTT if it would be better to try multiplexing the traffic on a single node between MQTT traffic and debug traffic for that node or implement a standalone debugging node that could publish requests for diagnostic information from any or all nodes and subscribe to the responses. I have used the latter method on several occasions with spectacular success.

What do you think?
 
Top