UART communication with Arduino Nano

Hi, i have some problem with uart communication.

I need arduino nano for pwm to control servo and dc motors.

so i tried to use uart through TXD/RXD pins (not USB. I want communicate by pins)

I tested echo program (when i typed on jetson, arduino send it back and turn on/off its built in led)

with minicom (terminal program for linux)

It sometimes display right letter, but usually displays wrong and weird letter and led does not work well too.

When I tried it on Raspberry Pi 3B+, It works well. No single problem.

Anybody knows why this problem happens? and how to fix it?

(+ I use level shifter (3.3v <-> 5v) so I think it is not because of voltage difference)

(+ I also tried with pyserial python code, but same problem occurs)

hello fbkc0331,

did you mean you had data loss occasionally?
please check similar discussion thread, Topic 1063027.
you might execute getty running at background to ensure data transferred properly,
for example,

$ sudo /sbin/getty -a ubuntu -L 115200 ttyTHS<port> &

Thank you very much for your answer. but i think it is not exactly “loss”.

Cracked character or wrong character appears, for example, when I press key ‘a’ and maintain it,

jetson displays cracked character or wrong character such as ‘p’, ‘k’ …

I solved it by using USB (/dev/ttyUSB0) but I wonder why uart through gpio pins not works.

because i don’t want to use USB for communication (it takes more space than gpio pins with jumper cables)

(uart between arduino & Rpi 3B+ works with gpio pins and uart between Rpi & Jetson also works with gpio pins)

Depending on speed, you may find that using two stop bits instead of one stop bit helps. In some cases CTS/RTS flow control will help (but requires two more wires).

If you are trying to communicate directly with a device, you do not want to have a serial console running. You will need to stop the getty service. Here’s an article:

I recently got the UART serial to function flawlessly using the J41 GPIO pins 6, 8 & 10 (“/dev/ttyTHS1”) with a C++ example. See following thread.

[url]https://devtalk.nvidia.com/default/topic/1057441/jetson-nano/nano-uart-c-c-example/post/5395530/#5395530[/url]

I plan to communicate with my Teensy 3.6 micocontroller (Arduino-like), now that I know it works.

I have the same purpose to you. Let arduino control Step Motor and commute UART with Jetson Nano. But i dont know how to do. Can you show me ? Thanks a lot.

Hi minhkhoi1406,

Please help to open a new topic for your issue. Thanks