A10 UART2 RTS/CTS

Started by mgrcf, May 14, 2014, 06:17:49 PM

Previous topic - Next topic

mgrcf

Hi everyone,

we are trying to get RS485 working using a MAX485 and our A10 Lime board. Therefore, we need to get the RTS/CTS Pins running for UART2.

My FEX config for uart2 looks like this:

[uart_para2]
uart_used = 1
uart_port = 2
uart_type = 4
uart_tx = port:PI18<3><1><default><default>
uart_rx = port:PI19<3><1><default><default>
uart_rts = port:PI16<3><1><default><default>
uart_cts = port:PI17<3><1><default><default>

I have also removed the Ports PI16-19 from the gpio section.

The device comes up as ttyS1 (I've disabled UART1) as you can see in the dmesg output below:

[    1.135882] [uart]: serial probe 2 irq 3 mapbase 0x01c28800
[    1.167392] sunxi-uart.2: ttyS1 at MMIO 0x1c28800 (irq = 3) is a U6_16550A

When I run "cat /proc/tty/driver/serial" I get the following output:

root@a10Lime:~# cat /proc/tty/driver/serial
serinfo:1.0 driver revision:
0: uart:U6_16550A mmio:0x01C28000 irq:1 tx:4034 rx:0
1: uart:U6_16550A mmio:0x01C28800 irq:3 tx:679406 rx:125 fe:11 brk:1 RTS|DTR
2: uart:unknown port:00000000 irq:0
3: uart:unknown port:00000000 irq:0
4: uart:unknown port:00000000 irq:0
5: uart:unknown port:00000000 irq:0
6: uart:unknown port:00000000 irq:0
7: uart:unknown port:00000000 irq:0

It seems like the FEX file isn't working properly as I get RTS and DTR instead of RTS/CTS.

Any ideas how to fix this? Or is this ok?

fabiolinux85

Hi, I have to realize the same thing! I wanted to know if you have managed to solve!

lamazavr

Is anyone got working RTS signal?
I have an alinuxino-a10lime board.
I use this fex:


[uart_para0]
uart_used = 1
uart_port = 0
uart_type = 2
uart_tx = port:PB22<2><1><default><default>
uart_rx = port:PB23<2><1><default><default>

[uart_para1]
uart_used = 1
uart_port = 1
uart_type = 8
uart_tx = port:PA10<4><1><default><default>
uart_rx = port:PA11<4><1><default><default>
uart_rts = port:PA12<4><1><default><default>
uart_cts = port:PA13<4><1><default><default>
uart_dtr = port:PA14<4><1><default><default>
uart_dsr = port:PA15<4><1><default><default>
uart_dcd = port:PA16<4><1><default><default>
uart_ring = port:PA17<4><1><default><default>

[uart_para2]
uart_used = 1
uart_port = 2
uart_type = 4
uart_tx = port:PI18<3><1><default><default>
uart_rx = port:PI19<3><1><default><default>
uart_rts = port:PI16<3><1><default><default>
uart_cts = port:PI17<3><1><default><default>

[uart_para3]
uart_used = 1
uart_port = 3
uart_type = 4
uart_tx = port:PH00<4><1><default><default>
uart_rx = port:PH01<4><1><default><default>
uart_rts = port:PH02<4><1><default><default>
uart_cts = port:PH03<4><1><default><default>


But a got this:

# cat /proc/tty/driver/serial
serinfo:1.0 driver revision:
0: uart:U6_16550A mmio:0x01C28000 irq:1 tx:12214 rx:563 RTS|DTR
1: uart:U6_16550A mmio:0x01C28400 irq:2 tx:2 rx:1 brk:1 CTS|DSR|CD|RI
2: uart:U6_16550A mmio:0x01C28800 irq:3 tx:0 rx:0
3: uart:U6_16550A mmio:0x01C28C00 irq:4 tx:2 rx:1 brk:1 CTS


I don`t understand this. Looks like i got some random settings.