External device serial communication

1.preparation

This section tests the tutorial of Jetson Orin NX serial port sending and receiving on its own. From the figure below, it can be seen that the TXD and RXD pins of the serial port of the Jetson Orin NX correspond to physical pins 8 and 10, respectively.

image-2023041200001

Wiring: Jetson Orin NX pin 8(TXD)→Jetson Orin NX pin 10(RXD)

image-2023041200002

Enable the serial port permission. Please note that this permission will also be disabled after shutdown, and you need to restart it next time

2.Using routines to test the functionality of serial ports

Download a serial communication case from Github, the source code and explanation can be viewed through this Github connection

Enter folder

If you do not intend to use the serial console on UART, you should disable the serial console (it may not be a personal choice):

Install the serial module

Terminal input running program:

image-2023041200004

After running, you can see the characters in the "NVIDIA Jetson Orin NX Developer Kit" sent by the Jetson Orin NX loop and displayed on the terminal.

image-2023041200005

3.Testing using Linux's serial port assistant

1.Testing using Yahboom routines

You can see that the cutecom is open Generally, there is no need for settings. Simply click on open to use it, and then input text through Input. Press the Enter key to send the content. The effect is as shown in the picture:

image-2023041200003

4.Testing using Yahboom routines

1.Testing using Yahboom routines

The phenomenon can be seen and any message sent can be replied to

5.note

If using a USB to TTL module for communication between a computer and Orin nx, please note the following points 1.DuPont cable should not be too long, as it will cause garbled code 2.The situation of only receiving but not sending is caused by insufficient voltage. Connect the 5V port of the USB to TTL module to the 5V port of the nano 3.If the line is reasonable but garbled, check whether the baud rate, parity, and stop bit are consistent 4.Other case:https://blog.csdn.net/lxj362343/article/details/89646731