-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Description
I'm using a mega2560 in a datalogger with a computer periodically interrogating the Arduino via the usb-serial link. The data throughput is very low (about 100 characters per 10 seconds) and the bitrate is set at 38400. The 16U2 hangs erratically - sometimes in a few minutes and sometimes after 3 or 4 days - and I have verified that the problem is with the 16U2 by connecting another usb-serial adapter to TX0 + RX0 to confirm that I can still communicate with the atmega2560 and that it was functioning as expected.
Sometimes, before the 16U2 hangs it erroneously retransmits old data as if the circular buffer within the 16U2 was poorly implemented and the software didn't know the head from the tail. However, this is not always the case so I can't rule out other possible causes such as stack corruption.