On 07/09/2015 02:49 PM, evilwulfie wrote:
> http://www.ti.com/lit/ug/spruh73l/spruh73l.pdf
>
> The available baud rates for UART mode are shown in Table 19-25.
>
> page 4236
Those baud rates are not exhaustive.
The 14-bit divisor of the UART baud rate generator allows for a baud
rate from 300bps to 3.7Mbps.
The formula for actual baud rate is:
[1] baud = uartclk / divisor / {16,13}
uartclk is the uart functional clk, and is typically 48MHz.
The Linux serial core shows the uartclk for a given UART port
at /sys/class/tty/<tty of UART>/uartclk. Eg.
peter@black:~$ sudo cat /sys/class/tty/ttyS4/uartclk
48000000
The {16,13} refers to the fixed oversampling divider.
OMAP has 2 selectable, fixed dividers, 16x or 13x. The linux
kernel driver will compute the error for both and pick the
divider with the smallest absolute error.
To compute the divisor for a given baud rate:
[2] divisor = uartclk / (baud * {16,13})
Eg. to compute the divisor for 5760 baud:
divisor = 48000000 / (5760 * 16) = 520.833 round() => 521
48000000 / (5760 * 13) = 641.025 round() => 641
Substituting both divisors into formula [1] to determine the
actual baud rates,
actual = 48000000 / 521 / 16 = 5758 with error 2
= 48000000 / 641 / 13 = 5760 with error 0
The linux serial driver will select the 13x fixed divider and a
divisor value of 641 to obtain 5760 baud.
Using the BOTHER method of setting a custom baud rate is roughly
outlined in the stackoverflow link noted by William.
I hacked up a quick test to set this baud rate in an i/o validation
test jig and confirmed with a scope the signal period of ~173.6 us
Regards,
Peter Hurley
> seems it cannot be done
>
> you will need to use an external UART that can do that baudrate
>
>
>
>
>
>
>
>> /When running the aforementioned command I received the following
>> feedback/
>> /
>> /
>>
>> /root@beaglebone:/# stty -F /dev/ttyO1 5760/
>>
>> /stty: invalid argument `5760'/
>>
>> /Try `stty --help' for more information./
>>
>>
>> Yes, that was mentioned on stackoverflow as a possibility. In which case,
>> you're going to have to find a way to set the buadrate multiplier. Short of
>> writing an app in C ( as in answer #1 from that link ).
>>
>> No idea how good your C is, but if decent it should be fairly trivial to
>> write a middleware communications application. Again, I've not done this on
>> Linux myself, so . . .
>>
>> On Thu, Jul 9, 2015 at 10:51 AM, Marlon Cesar Pilonetto
>> <[email protected] <mailto:[email protected]>> wrote:
>>
>> When running the aforementioned command I received the following feedback
>>
>> root@beaglebone:/# stty -F /dev/ttyO1 5760
>>
>> stty: invalid argument `5760'
>>
>> Try `stty --help' for more information.
>>
>>
>> Em quinta-feira, 9 de julho de 2015 14:38:24 UTC-3, William Hermans
>> escreveu:
>>
>> According to this:
>> http://stackoverflow.com/questions/12646324/how-to-set-a-custom-baud-rate-on-linux
>> /
>> /
>>
>> //
>>
>> /You can set custom baud rate using |stty| command on linux. For
>> example, to set custom baud rate of 567890 on your serial port /dev/ttyX0
>> use the command/
>>
>> //
>>
>> |/stty -F /dev/ttyX0 567890/|
>>
>> This may / may not work. But possibly worth a try.| The first answer
>> may also
>> work but I've never done this in linux, so could not say for sure.
>> |
>>
>>
>>
>> On Thu, Jul 9, 2015 at 10:22 AM, Harvey White
>> <[email protected]> wrote:
>>
>> On Thu, 9 Jul 2015 09:39:28 -0700 (PDT), you wrote:
>>
>> >The pump has closed protocol and communicates via current loop,
>> use a
>> >serial loop converter to communicate. I have an application
>> that works that
>> >way with several pumps market the only problem with this is the
>> BAUDRATE.
>> >Does anyone know how to configure the serial port to work with
>> BAUDRATE of
>> >5760? This is my only doubt.
>>
>> 5760 is not standard... could it be 57600?
>>
>> Otherwise there is a baudrate register that must be adjusted.
>>
>> Harvey
>>
>> >
>> >Em quinta-feira, 9 de julho de 2015 12:13:15 UTC-3, Wulf Man
>> escreveu:
>> >>
>> >> paste a link to this fuel pump
>> >>
>> >>
>> >> On 7/9/2015 7:57 AM, Marlon Cesar Pilonetto wrote:
>> >>
>> >> The baud rate the fuel pump uses is 5760 and I am unable to
>> communicate with her through my application. The same application on fuel
>> pumps with baud rate 9600 works perfectly .
>> >>
>> >>
>> >> Em quarta-feira, 8 de julho de 2015 14:23:33 UTC-3, Wulf Man
>> escreveu:
>> >>>
>> >>> Standard baud rates supported by most serial ports:
>> >>> 110
>> >>> 300
>> >>> 600
>> >>> 1200
>> >>> 2400
>> >>> 4800
>> >>> 9600
>> >>> 14400
>> >>> 19200
>> >>> 28800
>> >>> 38400
>> >>> 56000
>> >>> 57600
>> >>> 115200
>> >>>
>> >>> Standard baud rates supported by some serial ports:
>> >>> 128000
>> >>> 153600
>> >>> 230400
>> >>> 256000
>> >>> 460800
>> >>> 921600
>> >>>
>> >>> is your baud rate somewhere in this chart ?
>> >>>
>> >>>
>> >>>
>> >>> On 7/8/2015 7:20 AM, [email protected] wrote:
>> >>>
>> >>> Hello,
>> >>>
>> >>> Excuse my lack of knowledge on the subject as it is the
>> first time I am
>> >>> working with BEAGLEBONE. So I'm trying to communicate with a
>> fuel pump that
>> >>> has a BaudRate of 5760'm using node js in my application.
>> However I can not
>> >>> even configure the serial port with this BaudRate, can
>> anyone help me with
>> >>> this please.
>
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.