A20-OLinuXino-Lime UART ports

Started by Anushka, April 16, 2022, 08:11:40 AM

Previous topic - Next topic

Anushka

I am using olimex A20 UART port for data communication but only UART0 is responding other UART ports are not working. Also UART0 is having problem it is not working well I am using RS232 to transmit and receive the data from computer via UART cable but my data is not received properly. 
I want to use other UART ports like UART3 as PG6(tx) &PG7(rx) but I am not getting any output.
Here is my code,
ser = serial.Serial("/dev/ttyS3" , 9600, timeout = 0.5)
receivedString = ser.readline().decode("utf-8")
print(receivedString)

I get empty string as my output.

LubOlimex

Are you using Olimage Linux? Did you run olinuxino-config script to enable more UARTs?

Refer to this document: https://github.com/OLIMEX/OLINUXINO/blob/master/DOCUMENTS/OLIMAGE/Olimage-guide.pdf
Technical support and documentation manager at Olimex

Anushka

Yes I am using olimage Linux. I can not find location of config script. Can you tell its location commands?

mactronica

The encoded address (/soc@1c00000/serial@1c28c00) in DTS is the wrong one and refers to UART1 instead of UART3.
You can see it here:

https://github.com/OLIMEX/olinuxino-overlays/blob/master/sun7i-a20/sun7i-a20-uart3.dts

JohnS

Quote from: mactronica on April 19, 2022, 09:30:48 PMThe encoded address (/soc@1c00000/serial@1c28c00) in DTS is the wrong one and refers to UART1 instead of UART3.
You can see it here:

https://github.com/OLIMEX/olinuxino-overlays/blob/master/sun7i-a20/sun7i-a20-uart3.dts
Looks correct to me, referring to the A20 doc.

John

LubOlimex

Quote from: Anushka on April 19, 2022, 09:26:09 PMYes I am using olimage Linux. I can not find location of config script. Can you tell its location commands?

It is just you can type and execute commands in the command line interface as soon as you login.

How do you access the board?
Technical support and documentation manager at Olimex

mactronica

Quote from: JohnS on April 19, 2022, 11:37:28 PMLooks correct to me, referring to the A20 doc.

John

I'm sorry. My statement is not accurate. It's UART3 but it's mapped on ttyS1:


olimex@a20-olinuxino:~$ dmesg | grep tty
[    0.000000] Kernel command line: root=PARTUUID=de3c5b85-01 rootwait console=ttyS0,115200 panic=10 loglevel=4
[    1.079397] printk: console [ttyS0] disabled
[    1.079534] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 59, base_baud = 1500000) is a 16550A
[    1.096391] printk: console [ttyS0] enabled
[    1.098798] 1c28c00.serial: ttyS1 at MMIO 0x1c28c00 (irq = 60, base_baud = 1500000) is a 16550A
[    1.100638] 1c29000.serial: ttyS2 at MMIO 0x1c29000 (irq = 61, base_baud = 1500000) is a 16550A
[    1.102874] 1c29400.serial: ttyS3 at MMIO 0x1c29400 (irq = 62, base_baud = 1500000) is a 16550A
[    1.104632] 1c29800.serial: ttyS4 at MMIO 0x1c29800 (irq = 63, base_baud = 1500000) is a 16550A
[    1.106474] 1c29c00.serial: ttyS5 at MMIO 0x1c29c00 (irq = 64, base_baud = 1500000) is a 16550A
[    6.771787] systemd[1]: Created slice system-getty.slice.
[    6.812537] systemd[1]: Created slice system-serial\x2dgetty.slice.


JohnS

Is there a problem with uart2.dts?

It uses
serial2 = "/soc/serial@1c28800";

which I thought might be
serial2 = "/soc@1c00000/serial@1c28800";

Is there no ttySx for it?

John

Anushka


Quote from: LubOlimex on April 20, 2022, 08:53:55 AM
Quote from: Anushka on April 19, 2022, 09:26:09 PMYes I am using olimage Linux. I can not find location of config script. Can you tell its location commands?

It is just you can type and execute commands in the command line interface as soon as you login.

How do you access the board?
I typed that comments on terminal but its not working.It is showing commands not found after typing the code in the doc https://github.com/OLIMEX/olinuxino-overlays/blob/master/sun7i-a20/sun7i-a20-uart3.dts

LubOlimex

Umm it looks like this here: https://i.imgur.com/GgOgdrq.jpg

How do you access the board?
Technical support and documentation manager at Olimex

Anushka

Quote from: LubOlimex on April 22, 2022, 04:53:58 PMUmm it looks like this here: https://i.imgur.com/GgOgdrq.jpg

How do you access the board?

I access the board through terminal. I run the code but its not working. When I typed command olinuxino- on terminal it said commands not found.

JohnS

As in the image posted, the command is olinuxino-overlay

John

LubOlimex

Quote from: Anushka on April 23, 2022, 01:26:57 PM
Quote from: LubOlimex on April 22, 2022, 04:53:58 PMUmm it looks like this here: https://i.imgur.com/GgOgdrq.jpg

How do you access the board?

I access the board through terminal. I run the code but its not working. When I typed command olinuxino- on terminal it said commands not found.


"olinuxino-" then you press "TAB" key to auto-complete all items whose name start with "olinuxino-"
Technical support and documentation manager at Olimex