abcminiuser / lufa

LUFA - the Lightweight USB Framework for AVRs.
http://www.lufa-lib.org
1.03k stars 321 forks source link

Lufa CDC class increase baud rate #157

Closed salehhp closed 4 years ago

salehhp commented 4 years ago

Hi I have already a project that must send data every 1 mili second 27 byte via serial port, in Lufa CDC class when I send every 2 mili second everything is ok and it may be because of 115200 baud rate but when I change to 1 mili second the data sending become very slow. I can't find how to increase the baud rate (xmega32u4). I asked this question on avrfreak but nobody can't help me and some person told me I can find Dean here to answer my question. How can we increase baud rate?

abcminiuser commented 4 years ago

What are you changing to set the millisecond interval? Are you trying to send data via the physical UART, or are you only sending data to the host over USB?

If USB, you are limited to sending one bulk IN packet every millisecond due to the relatively slow Full Speed USB connection. Using double buffered endpoints should get you closer to that theoretical rate.