Hello,
i have all 3 UART enabled and only UART 0 and UART 1 works. UART 2 isn’t working at all. Is there any known issue? I currently need all 3 of them.
Thanks & Regards.
Hello,
i have all 3 UART enabled and only UART 0 and UART 1 works. UART 2 isn’t working at all. Is there any known issue? I currently need all 3 of them.
Thanks & Regards.
Update:
both pins (rx/tx) work in GPIO mode as expected but as UART2 this pins doesn’t work.
It seems the Kernel DTS is buggy. This ugly patch will fix it: https://pastebin.com/a0xw6CMX
But it will disable wireless and uart0 rts/cts functions but it works for me because i have a no wifi board.
Would be nice if you can fix it in the future.
The next problem is u-boot, it will stop the autoboot if there is any data on UART0 …
uart2 (/dev/ttyS2) is still buggy on Hardware V1.2 without BT Wifi on debian buster (2020-03-16) updated (26.05.2020) with versions
rockchip-overlay 2.6
kernel 4.4.143-47-rockchip-g495ff574976c
rk3308-uart2
this enables the kernel console on uart2, but it should not
rk3308-console-on-uart2
this enables the kernel console on uart2, but with unreadable output
Hi ,I suggest that you use this image https://dl.radxa.com/rockpis/images/debian/rockpis_debian_buster_minimal_arm64_20200528_1227-gpt.img.gz.
To use 3 UARTs, you can view the " Common Hardware Interfaces" part of https://wiki.radxa.com/RockpiS/Debian.
Hi, I got the debian buster (2020-03-16) image working. I will also try the newer image, thanks.
Regarding the debian buster (2020-03-16) image:
The uart2 is configured serial-console at default in boot.cmd
. To disable it, one has to unset console
in uEnv.txt
. Example:
In uEnv.txt
console=
This disables the serial console on uart2, which enabled by default in debian buster (2020-03-16). Interestingly choosing rk3308-console-on-uart2 with default settings gives double output of console to uart2, which results in unreadable gibberish.
The new debian image is also working, and easier to configure, thank you.
Stephen, I´m trying to use usart0 with usart.c and usart_advanced.c examples in mraa library.
In the wiki I saw that I have to edit uEnv.txt to erase dev/ttyS0 in console line and I already did.
There is no problem when I run the compiler for usart.c or usart_advanced.c. When I try to execute, there is a problem with mraa_uart_init_raw() function and the program fails (Failed to initialize UART). Could you help me?
I´m sorry for asking help in every single step.
Best Regards,
Gonzalo Guerrero
P. S: I’m using latest released ubuntu and usart test using rock@rockpis:~$ sudo mraa-uart dev 0 baud 1500000 send radxa and rock@rockpis:~$ sudo mraa-uart dev 0 baud 1500000 recv 1000
radxa works fine.
Thanks a lot for your answer.
I’ve enable uart1 by adding overlay in uEnv.txt. Also, Ive succesfully tested uart1 with the same commands. I
ve edited uart_advanced.c replacing dev_path ="/dev/ttyS0" with dev_path ="/dev/ttyS1", then I’ve compiled the C file. When I ran the executable file, the error is the same.
Regards,
Gonzalo Guerrero
Check if the UART is enabled, you can execute the command. It may show some serial setup messages.
sudo dmesg | grep serial
Hi! I solved this problem.
We can enable uart function in startup settings, enable uart overlay you want to use.
I believe this works for all rock cards.
Find all available uart peripherals executing this command:
find /boot/dtbs/4.4.143-55-rockchip-g6b7accbc999b/rockchip/ | grep uart
the output is similiars with this:
root@rockpis:/# find /boot/dtbs/4.4.143-55-rockchip-g6b7accbc999b/rockchip/ | grep uart
/boot/dtbs/4.4.143-55-rockchip-g6b7accbc999b/rockchip/overlay/rk3308-console-on-uart0.dtbo
/boot/dtbs/4.4.143-55-rockchip-g6b7accbc999b/rockchip/overlay/rk3308-console-on-uart1.dtbo
/boot/dtbs/4.4.143-55-rockchip-g6b7accbc999b/rockchip/overlay/rk3308-console-on-uart2.dtbo
/boot/dtbs/4.4.143-55-rockchip-g6b7accbc999b/rockchip/overlay/rk3308-uart0.dtbo
/boot/dtbs/4.4.143-55-rockchip-g6b7accbc999b/rockchip/overlay/rk3308-uart1.dtbo
/boot/dtbs/4.4.143-55-rockchip-g6b7accbc999b/rockchip/overlay/rk3308-uart2.dtbo
And the available ports is:
rk3308-uart0.dtbo
rk3308-uart1.dtbo
rk3308-uart2.dtbo
if that doesn’t work, find the folder avaiable into /boot/dtbs and replace it in command directory path ( /boot/dtbs/{AVAILABLE FOLDER}/rockchip/)
verbosity=7
fdtfile=rockchip/rk3308-rock-pi-s.dtb
console=ttyS0,1500000n8
overlays=rk3308-uart0, rk3308-uart2 <====== Your uart ports can write on this line separated by a comma
rootuuid=ee60d2e1-358c-467c-acc8-a147c5b38695
initrdsize=0x5c96f8
kernelversion=4.4.143-55-rockchip-g6b7accbc999b
initrdimg=initrd.img-4.4.143-55-rockchip-g6b7accbc999b
kernelimg=vmlinuz-4.4.143-55-rockchip-g6b7accbc999b
Save it and reboot the system.
Hi androidtester,
i am using rock 3c model and enabled uart but failed to enable. can you please help how to enable?