Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    UART maximum speed

    Hi everybody,
    does linux support uart baud rate above B4000000? If so how to set it (i.e. if i want to set 10Mps)?

    My hardware supports up to 15Mbps, under windows works fine, but under linux i cannot set speed above 4Mbps, i modified the driver to set up the receiving board at the desired speed and the receiver buffer trigger, but if i set the speed at 10Mps i can receive only the firsts 170-200 bytes of a streaming data without errors. If i divide the streaming in blocks of 16 bytes with a delay of about 40ms between them (this corresponds to about 4Mps) the errors disappears.

    It seems that there is a limit of 4Mbps in linux. is this correct? if so, how to reach higher baund rates?

    Thanks in advance

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    What kind of flow control are you using? UARTs are serial devices, and when their hardware buffers fill up, they need to be throttled/blocked from further input until the buffers are emptied. In my antique experience, 192K was about as good as we could get. If you can get 4M now, kewl! So, from your post, I would expect that the hardware buffer is something like 150 bytes or so (normal), and you get 170-200 bytes at such high speeds because some data is processed before you "hit the wall". For such speeds I would expect that hardware flow control would be required - not software such as xon/xoff, but more like cts/rts which rely upon properly connected signal lines.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    The device has a buffer of 128 bytes and i'm not using any kind of flow control. Under windows i tested the hardware and works fine up to 15Mbps without any flow control!! The trigger level is set at 100 both in linux and windws! How it is possible? It is possible that linux cannot acquire data above 4Mbps?
    Looking into definition files under linux i saw that B4000000 is defined as the maximum baud rate specifiable with termios, termois.h reports: #define __MAX_BAUD B4000000 (i haven't used termois... i set the device registers to set up the desired baud rate)...



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts