Jump to content
ryo

[Tinker Board 3S] UART0 of 40pin-GPIO

Recommended Posts

Hello,

I am trying to connect an UART device (MCU)  to a TinkerBoard3S.
I have confirmed that UART1, 4, and 9 work correctly, but it does not work with UART0.
Is there any difference between UART0 and UART1,4,9?
I have checked the performance with baudrates of 9600, 115200.

I assume that UART0 has CTS and RTS pins.
Therefore, I have set the CTS and RTS pins to not be used in the software.
I attached sample python code with pyserial module.

>>> import serial
>>> ser = serial.Serial("/dev/ttyS0", 9600, timeout=1)
>>> ser.rtscts=False
>>> ser.dsrdtr=False
>>> ser.rts=False
>>> ser.dtr=False

Are there any other necessary settings?

Share this post


Link to post
Share on other sites

hello @ryo

we've tested your sample code and cannot reproduce the issue. 

1. please ensure the multi-function is switched to uart0 (pwm0, pwm1, pwm2, pwm5 are all disabled, otherwise it'll be conficted with uart0, this can be checked in /boot/config.txt ) 

2. does ttys0 exist under /dev/ ?

ls /dev/

if the answers above are yes, what does the error look like?

Share this post


Link to post
Share on other sites

Hello @tooz,
Thank you so much for your kind message and help.

I have checked the questions you asked.
1. checked /boot/config.txt and confirmed that pwm=0,1,2,5 are all off
2. confirmed that /dev/ttyS0 exists.
Therefore, the answers to both questions are yes, but MCU does not work with UART0.

I will describe the details of the problem. I think this is confusing. I apologize.

I still cannot send or receive messages to a specific MCU.
To check the communication status, I connected a USB-UART (FTDI) to a Windows OS laptop
and was able to communicate accurately with the Windows console (Teraterm) via UART0.

[Windows] - [USB] - [USB-UART] - [GPIO]

This made me think that it was a problem with the MCU software,
but I was able to communicate accurately with the MCU via UART1, 4, and 9.

I thought that there might be a difference in the hardware between UART0 and UART1, 4, and 9,
but if there is no difference, I will investigate whether communication is possible with MCUs from different manufacturers.

The version information of the Kernel and OS currently used is as follows.

linaro@linaro-alip:~$ uname -a
Linux linaro-alip 5.10.209 #1 SMP Wed Oct 30 10:46:21 UTC 2024 aarch64 GNU/Linux
linaro@linaro-alip:~$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)”
NAME="Debian GNU/Linux”
VERSION_ID="11”
VERSION="11 (bullseye)”
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/”
SUPPORT_URL="https://www.debian.org/support”
BUG_REPORT_URL="https://bugs.debian.org/”
BUILD_INFO="root@16c4f514c5ab Wed Oct 30 11:31:37 UTC 2024”
ID_LIKE="debian”
RK_BUILD_INFO="root@16c4f514c5ab Wed Oct 30 11:35:04 UTC 2024”

Best regards,

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...