Glomation
 
Advanced Search
Welcome, Guest. Please login or register.

Login with username, password and session length
May 20, 2012, 02:34:34 AM
News: Glomation introduces new GECM-9G25 SODIMM system on module
Pages: [1]
Topic Tools  
Read August 31, 2011, 05:34:55 PM #0
Jellomoldbrain

Baudrates for RS-485

I am using Kernel 2.6.38-8.   I have RS-485 working fine at 115,200 baud.

I have a device I want to connect too that runs at 2,088,000 baud. 

Linux has a B2000000 setting, but what is the actual exact baud rate produced by the chip?  2,000,000 is 4.4% off 2088000.

** Has anyone used speeds like this?
** What is the maximum rate anyone has been able to use?
 
Read September 02, 2011, 06:39:52 PM #1
Jellomoldbrain

Re: Baudrates for RS-485

After some work I have confirmed that I can get a baudrate of 2.064Mb which is .24%.
here is a code snippet from my init routine..

   struct serial_struct serialconf;

        ...  set up port with termios struct

   ioctl(portFileDescriptor, TIOCGSERIAL, &serialconf);
   serialconf.flags=(serialconf.flags&(~ASYNC_SPD_MASK)) | ASYNC_SPD_CUST;
   serialconf.custom_divisor=4;
   if (ioctl(portFileDescriptor, TIOCSSERIAL, &serialconf))
      printf("ioctl TIOCSSERIAL");
   tcflush(portFileDescriptor, TCIFLUSH);

        ... configure port for rs485 with serial_rs485 struct

your final baud rate will be  (from above code) = serialconf.baud_base / serialconf.custom_divisor

my base_baud is 8256000
custom_divisor is an integer (I chose 4)

Potentially, and I will test this if able, I could have used 8.256Mb as my baud rate.
 
Pages: [1]
Jump to:  

Theme Update by Runic Warrior Originally created by m3talc0re