Unreliable serial communcation via the UART TX/RX GPIO Pins

I decided to skip the Arduino (as its using 5v logic) and get back to the board which I actually need to use in my project with the Jetson.

The Protoneer Raspberry Pi CNC Board.
Based on the documentation and confirmed in this and this posts, it is using 3.3v logic for the TX and RX communication.

I scoped the board behavior on the Raspberry Pi, with which it works perfectly. Data goes both ways and looks good on the scope. Via minicom, I was sending a simple “$$” command which queries the GRBL firmware flashed on the board to echo back the list of all the settings.

Here are some pictures…

My setup with the Pi:

Sample Incoming data from the board (a list of GRBL settings):

Scoping the RX Pin on the Pi, showing incoming data from the board:

Scoping TX pin on the Pi showing outgoing data to the board:

I tried to re-create the same setup on the Jetson Nano:

The data stream in minicom is completley scrambled:

Scoiping The RX Pin of the Jetson for incoming data from the CNC board looks ok:

Scoping the TX pin of the Jetson for outgoing data from the Jetson to the CNC Board looks messy:

What could be causing this?

1 Like

Did you check minicom settings again this time for flow control?

Yup they are both off

Hi yuikleb,

Did you manage to find a solution? I am experiencing the same issue with my Jetson Xavier NX Developer Kit. I can receive serial on pin 10(RX), but am unable to send serial through pin 8(TX). As you mentioned they are on port /dev/ttyTHS0.

If I use a USB-TTL serial adapter on the Xavier, I can both send and receive from the Xavier to my other board with no problem. That would be a shortcut but I need to use GPIO pin for my final system.

Besides direct terminal commands, I also followed this link Jetson Nano - UART - JetsonHacks but either case I could not send serial from GPIO.

Thank you in advance!

@camasmie as mentioned above, I’m having problems with the TX pin on both the Nano and the Xavier Dev Kits.
It seems like the Jeston are very picky. While working well with some boards they refuse to work with others.
I’m also expiriencing problems with the I2C pins. The Jetsons work with some I2C devices while refusing to detect otheres (but that’s a topic for a different thread)

My current solution is similar to yours - wire the TX/RX pins on the board im using via a USB-TTL (FTDI chip) to the Jetson USB port. Very hacky and convoluted but seems to be the only relieble solution for now.

This is my current setup:

I printed an adaprter to fix the USB-TTL board onto the Jetson USB sockets:

All right, thank you for the update. I will just do that for now USB-TTL, to not waste time trying to fix something that should have just worked out of the box.

EDIT

@yurikleb using the USB-TTL caused new problems with buffer stream buffer. So I went back to the GPIO pin example, and it actually worked with my STM32 target hardware over a RS485 bus. Thank you again.

1 Like

I’ve also been having issues with UART comms on a Jetson Nano and a Teensy 4.0, I’ve tried several baud rates (including 115200 8n1) and none of them seem to work reliably. Has anybody found a fix to this solution? I tried modifying the serial-tegra.c kernel driver to add more RX DMA memory, as I was getting overrun errors on dmesg, but that didn’t seem to solve anything.

1 Like

I can confirm the TX pin on the Jetson Nano is unreliable. I have inspected with digital logic analyser, and it shows it regularly misses a bit. When sending a byte it would ‘miss’ or be unable to set one of the last bits. Increasing the buadrate does help reduce this.

It seems like there is a low priority on the UART communication, since I have moved my comms to the USB port and now i have no problems. I unfortunately have to use a USB-to-UART converter to communicate with the other board.

My program which communicate over the UART is written in C, and uses the EPOLL library to check whether the device is ready to send or receive data.

This helped me to get correct data. You need to connect pull down ~10 kOhm resistor from RX and TX (GPIO 8, 10 pins) to the jetson nano’s ground.

4 Likes