There is a really bad while loop in the transmit interrupt driver that causes the CPU to spend most of its time looping with interrupts disabled in the interrupt driver.
I must say I was very surprised to find this, makes one wonder what other things went passed code review and testing?
I have attached a simple test program that shows just how serious this is (try it with and without the patch):
Test_serial_bug.txt
Another way to test is to transmit a lot on one or more serial channels and receive at the same time. You will loose a lot of characters.
There is a really bad while loop in the transmit interrupt driver that causes the CPU to spend most of its time looping with interrupts disabled in the interrupt driver.
I must say I was very surprised to find this, makes one wonder what other things went passed code review and testing?
Anyway, the fix is here: https://github.com/arduino/ArduinoCore-megaavr/pull/42
I have attached a simple test program that shows just how serious this is (try it with and without the patch): Test_serial_bug.txt Another way to test is to transmit a lot on one or more serial channels and receive at the same time. You will loose a lot of characters.