I have two ESP32s attached to a DUE. The ESP32s are on SERIAL1 and SERIAL3. One handles all of the incoming traffic and passes it to the DUE through SERIAL1. The second handles any outbound traffic from the DUE on SERIAL3.
After about 2 days or running fine, I start seeing garbage from the DUE to the ESP32 on SERIAL3. The garbage is special characters such as the 'y' with the 2-dots above it, or the 'e' with the ~ above it.
Any suggestions how to prevent it?
They are passing JSON documents around to sending remote sensor information and communicating at 9600/8/N/1. ( I had them 115000 and slowed them down. That helped for a while.)
Heap fragmentation can cause the symptom of "runs fine for a while, but then fails." Use of String objects is a good way to achieve that. Other dynamic memory allocation can do it too of course.