I cannot seem to find any discussion of this so, here is a new topic. Please point me to an older one if it exists.
There seems to be a limitation on maximum throughput with serial data output from the Uno to USB of around 47k chars/second or so. Running the same code on an older Duemilanova (which uses FTDI chip) does not have this problem. Here are the specifics:
Firmware uses Serial class to set rate to 1M baud. From there on however, data is output via direct interaction with UDR0 and UDRE0 -- no more calls to Serial class are made. As such, I am 100% certain that no data is being lost or corrupted in the ATmega328.
At character rates up to about 47k chars/sec there's no problem, but exceeding that, I start to see characters being dropped.
I think the fact that this works fine on the Due means that there's a limit to how fast the firmware in the 16U2 can transfer data from its serial input to USB host.
Is this a known limitation? Perhaps there's a firmware bug in the 16U2?