Hi Emilio
Apologies, previous email sent by mistake.
>> And reattaching with 9600 makes it work again.
Ahh...thank you, that appears to work in that I don't get any error
messages
[root@A20-SOM ~]#
[root@A20-SOM ~]# setserial -v /dev/ttyS1 spd_cust
/dev/ttyS1, UART: U6_16550A, Port: 0x0000, IRQ: 51, Flags: spd_cust
[root@A20-SOM ~]# setserial -v /dev/ttyS1 divisor 15
/dev/ttyS1, UART: U6_16550A, Port: 0x0000, IRQ: 51, Flags: spd_cust
[root@A20-SOM ~]# setserial -ag /dev/ttyS1
/dev/ttyS1, Line 1, UART: U6_16550A, Port: 0x0000, IRQ: 51
Baud_base: 1500000, close_delay: 50, divisor: 15
closing_wait: 3000
Flags: spd_cust
[root@A20-SOM ~]#
I was following this url:
http://www.raspberrypi.org/forums/viewtopic.php?f=72&t=33315
Apparently I then issue a:
[root@A20-SOM ~]# stty -F /dev/ttyS1 38400
[root@A20-SOM ~]#
>> I've never heard of anyone using 100000, are you sure you can't use
115200 or one of the other standard speeds?
Yes, 100000 is correct for Futaba s.bus digital servo control. I'm trying
to read/write s.bus servo control via a UART + inverter (s.bus has inverted
signal)
Thanks again, guess I'll need a scope to confirm if the above actually sets
the baud to 100Khz
Bruce
On Sun, Feb 1, 2015 at 1:07 AM, bruce bushby <[email protected]> wrote:
> Hi Emilio
>
>
>
> [root@A20-SOM ~]#
> [root@A20-SOM ~]# stty -F /dev/ttyS1 9600
> [root@A20-SOM ~]# stty -F /dev/ttyS1 115200
> [root@A20-SOM ~]#
> [root@A20-SOM ~]# stty -F /dev/ttyS1 100000
> stty: invalid argument '100000'
> [root@A20-SOM ~]#
> [root@A20-SOM ~]# setserial -ag /dev/ttyS1
> /dev/ttyS1, Line 1, UART: U6_16550A, Port: 0x0000, IRQ: 51
> Baud_base: 1500000, close_delay: 50, divisor: 0
> closing_wait: 3000
> Flags: spd_normal
>
> [root@A20-SOM ~]# setserial /dev/ttyS1 spd_cust
> [ 81.049490] dw-apb-uart 1c29800.serial: setserial sets custom speed on
> ttyS1. This is deprecated.
> [root@A20-SOM ~]#
> [root@A20-SOM ~]# setserial --help
> BusyBox v1.22.1 (2015-01-22 20:55:37 GMT) multi-call binary.
>
> Usage: setserial [-gabGvzV] DEVICE [PARAMETER [ARG]]...
>
> Request or set Linux serial port information
>
> -g Interpret parameters as list of devices for reporting
> -a Print all available information
> -b Print summary information
> -G Print in form which can be fed back
> to setserial as command line parameters
> -z Zero out serial flags before setting
> -v Verbose
>
> Parameters: (* = takes an argument, ^ = can be turned off by preceding ^)
> *port, *irq, *divisor, *uart, *baud_base, *close_delay,
> *closing_wait,
> ^fourport, ^auto_irq, ^skip_test, ^sak, ^session_lockout,
> ^pgrp_lockout,
> ^callout_nohup, ^split_termios, ^hup_notify, ^low_latency,
> autoconfig,
> spd_normal, spd_hi, spd_vhi, spd_shi, spd_warp, spd_cust
>
> UART types:
> unknown, 8250, 16450, 16550, 16550A, Cirrus, 16650, 16650V2, 16750,
> 16950, 16954, 16654, 16850, RSA, NS16550A, XSCALE, RM9000, OCTEON,
> AR7,
> U6_16550A
>
> [root@A20-SOM ~]#
>
>
>
> On Sat, Jan 31, 2015 at 11:53 PM, Emilio López <[email protected]>
> wrote:
>
>> Hi,
>>
>> El 31/01/15 a las 20:25, bruce bushby escibió:
>>
>>> Hi
>>>
>>> I'm hoping a list member could offer some advice setting a UART with a
>>> custom speed.
>>>
>>> I was hoping to calculate the required divisor and use setserial to set
>>> my speed (100000), however both Python's pySerial and the "setserial"
>>> command cause the following error:
>>>
>>> [root@A20-SOM ~]# setserial /dev/ttyS1 spd_cust
>>> [ 697.027655] dw-apb-uart 1c29800.serial: setserial sets custom speed
>>> on ttyS1. This is deprecated.
>>> [root@A20-SOM ~]#
>>>
>>>
>>> Deprecated in favor of?
>>>
>>
>> It seems this has been deprecated for a couple of years now judging by
>> Google results. Have you tried using stty?
>>
>> On a 115200 terminal, the following makes it stop working
>>
>> stty -F /dev/ttyS0 9600
>>
>> And reattaching with 9600 makes it work again
>>
>> I had a look in the dts:
>>>
>>> uart6: serial@01c29800 {
>>> compatible = "snps,dw-apb-uart";
>>> reg = <0x01c29800 0x400>;
>>> interrupts = <0 19 4>;
>>> reg-shift = <2>;
>>> reg-io-width = <4>;
>>> clocks = <&apb1_gates 22>;
>>> status = "disabled";
>>> };
>>>
>>>
>>> ...however I don't understand the relationship between "22" and
>>> "&apb1_gates"
>>>
>>
>> It means that the gate feeding the UART hardware is the 22nd bit on the
>> register where the gates are.
>>
>> How do I set the divisor and/or configure my custom speed of 100000 for
>>> my UART6?
>>>
>>
>> I've never heard of anyone using 100000, are you sure you can't use
>> 115200 or one of the other standard speeds?
>>
>> Cheers,
>>
>> Emilio
>>
>
>
--
You received this message because you are subscribed to the Google Groups
"linux-sunxi" 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.