Problem Activating UART3

Started by hesspet, July 24, 2015, 04:41:49 PM

Previous topic - Next topic

hesspet

Hello,

I'm pretty deep in the water. I tried to activate UART3. From the LINUX point of view it looks working, but I get no signal on the pins.

This is what I have

uname -a
Linux a20-olimex 3.4.90+ #11 SMP PREEMPT Wed Aug 20 08:20:32 EEST 2014 armv7l GNU/Linux


root@a20-olimex:~# cat /proc/tty/driver/serial
serinfo:1.0 driver revision:
0: uart:U6_16550A mmio:0x01C28000 irq:33 tx:289425 rx:4789 RTS|DTR
1: uart:U6_16550A mmio:0x01C28C00 irq:36 tx:0 rx:0
2: uart:U6_16550A mmio:0x01C29800 irq:51 tx:0 rx:0
3: uart:U6_16550A mmio:0x01C29C00 irq:52 tx:1061867 rx: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


e.g. cat /dev/urandom > /dev/ttyS3

runs without any error messages.

This is what I've changed in the fex.bin


[uart_para3]
uart_used = 1
uart_port = 3
uart_type = 2
uart_tx = port:PG06<4><1><default><default>
uart_rx = port:PG07<4><1><default><default>
uart_rts = port:PG08<4><1><default><default>
uart_cts = port:PG09<4><1><default><default>


and

[csi1_para]
csi_used = 1


also tested with

[csi1_para]
csi_used = 0


and

[gpio_para]
....
gpio_pin_5 = port:PG04<0><default><default><default>
<...removed PG06-PG09...>


But when I send data to the serial, no signal. The Pins are +5V. (Looks like the pullup works)

So, I've no Idea why there is no signal. Did I missed something?

Thanks for help.

Peter




hesspet

#1
I solved it :-)

This gave me the answer:

root@a20-olimex:~# dmesg | grep tty
[    0.000000] Kernel command line: console=ttyS0,115200 root=/dev/mmcblk0p2 rootwait loglevel=8 panic=10
[    0.667429] sunxi-uart.0: ttyS0 at MMIO 0x1c28000 (irq = 33) is a U6_16550A
[    1.405475] console [ttyS0] enabled
[    1.445674] sunxi-uart.3: ttyS1 at MMIO 0x1c28c00 (irq = 36) is a U6_16550A
[    1.489249] sunxi-uart.6: ttyS2 at MMIO 0x1c29800 (irq = 51) is a U6_16550A
[    1.532794] sunxi-uart.7: ttyS3 at MMIO 0x1c29c00 (irq = 52) is a U6_16550A


It was a missunderstanding of how linux attaches the ttyS.... I allways tried to used ttyS3. But setting up UART3 in fex does not meant that this is ttyS3 it is ttyS1....  8)

Maybe this hint helps someone out if I tried to make the same thing. The setup above works. Only my testcase was the problem :-)