Suggestions on creating a Logger class for printing stuff to the debug console

‘Task Priority’ isn’t really a factor if you are waiting for a response.

If multiple task might send a query to a device and wait for a comms response, they take the mutex (which guard the Tx) send their query and hold the mutex until they get their response. Most devices don’t want a second request before the first is done.

If you get Comm Port OVERRUNs, your Interrupt Setup is bad, as you shouldn’t get locked out of an ISR for that long.

If you get a character when the FIFO is full, you need to do more than just throw away THAT character, or you will get apparent just random dropping of characters through the message. I put my receiver into an ‘overflow’ mode what ALL characters received after that are dropped until the receive task has emptied the FIFO and been told of the error. Then you have a clear marking in the data stream of where the error occurred. This maximizes the amount of ‘good’ data received under conditions when the system is lagging enough to fill the receive fifo.