79178499

Date: 2024-11-11 17:00:57
Score: 0.5
Natty:
Report link

Don't flush the serial port buffers. I just spent about a week trying to determine where data was getting lost. I think behavior is different between various serial ports, take the ESP32-S2, which has native CDC, and also a serial converter chip. I think the OS driver may implement port methods differently. On the ESP32-S3 CDC port, if flushIOBuffers() is called immediately after a write(), the data may never be transmitted.

I haven't researched all of the issues, and there are some things that could be monitored like buffer sizes, setting to blocking, etc.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Brian Michalk