You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
See lines 113,114 in firmwares/atmegaxxu2/arduino-usbserial/Arduino-usbserial.c -- I think this is where data is copied from serial into the USB hardware in the ATmega16U2.
The code waits until the buffer contains 96 bytes (or a timeout occurs for flushing). Then it enters a loop to send the bytes. It does not check return codes and I am not sure if the LUFA code checks to see if the hardware is ready either. See also CDC_Device_SendByte and Endpoint_Write_8 functions in LUFA.
The bottom line is that for very high baud rates (e.g. 1M baud), exceeding about 47k chars/s into the Uno's ATmega328 USART transmit buffer will cause characters to be dropped -- they are never seen at the USB host. I think the proof of a bug here is that using an Arduino board with FTDI chip (e.g. Duemilanova or SparkFun RedBoard) does not exhibit this problem.
It may or may not be possible for the ATmega16U2 to transfer data to USB above this rate -- I don't really know. What I do know is that this problem lies either with the hardware or firmware in the 16U2.
The text was updated successfully, but these errors were encountered:
I have tried to reproduce this with a very simple sketch, and cannot do so. I will investigate further, but for now this doesn't seem to be a problem with the 16U2.
See lines 113,114 in firmwares/atmegaxxu2/arduino-usbserial/Arduino-usbserial.c -- I think this is where data is copied from serial into the USB hardware in the ATmega16U2.
The code waits until the buffer contains 96 bytes (or a timeout occurs for flushing). Then it enters a loop to send the bytes. It does not check return codes and I am not sure if the LUFA code checks to see if the hardware is ready either. See also CDC_Device_SendByte and Endpoint_Write_8 functions in LUFA.
The bottom line is that for very high baud rates (e.g. 1M baud), exceeding about 47k chars/s into the Uno's ATmega328 USART transmit buffer will cause characters to be dropped -- they are never seen at the USB host. I think the proof of a bug here is that using an Arduino board with FTDI chip (e.g. Duemilanova or SparkFun RedBoard) does not exhibit this problem.
It may or may not be possible for the ATmega16U2 to transfer data to USB above this rate -- I don't really know. What I do know is that this problem lies either with the hardware or firmware in the 16U2.
The text was updated successfully, but these errors were encountered: