I had similar thoughts. I first thought it could be a cold solder joint. But, the fact that both serial ports start to get corrupted data at the same time seemed to make that unlikely. Despite that, I went ahead and eliminated the IDC headers and jumpers for the uart port 3. I soldered connecting wires directly. This eliminated any problems related to capacitance from the jumper wire connectors and forced me to re-flow the solder joints for that port.DId you make any progress on this? I can't imagine any component of the Pi 4 being temperature sensitive at 40C - it should be good to 100C. Ordinarily I would think think this was caused by a dry joint somewhere, but the fact that it affects UART3 and UART4 in the same way makes that unlikely.
I would try to debug this by connecting the USB serial adaptor to one of the affected UARTs, taking the AVR out of the equation, to see if corruption still occurs. I would also attach a scope or logical analyser to the UART signals to measure the actual baudrate in each direction, just in case an inaccurate frequency makes communication unreliable.

I plugged it all back together and lightly stressed the PI for about 15-20 minutes. I got the same result. In the screen grab below, you can see the unprintable characters starting to show up on the command line interface (UART 3, using tio) and the logger interface (UART 4, using tio). The number of corrupted/dropped characters gets worse with time.

I liked your suggestion to try a USB serial adapter. I plugged one into the PI and the logging UART on the AVR. Data transmitted without error.

I've tried various AVR 128DA28 parts from different batches. I have also plugged this PI HAT protoboard to another PI 4 and got the same result.
Another data point is I have another breadboard layout (wired the same way, just no HAT) with yet another PI 4. That one does not exhibit this problem.

Tomorrow, I'll try to build yet another HAT without the ZIF socket and IDC headers. I'll see how that goes. Been reluctant to build it until I figure out what's up with the current setup.
Statistics: Posted by d1g1t4l_g33k — Sat Apr 13, 2024 2:26 am