How to config to test the rs485 on jetson orin nano into minicom

Hi

I am testing RS485 on our custom jetson orin nano but i tried this uploaded image on inside jetson orin nano and my laptop (jetson connected laptop via USB RS485 adapter) but there is no datas are transmitting. I thought the config is wrong. Help me to config the UART and RS485 on Custom jetson orin nano. I Tried UART also with disable the rs485 but its not working by connecting the rs485 A+ and B- (Short connection).

Note: inside minicom it showing Offline on both side sender and receiver.

*** Please note that this reply is generated by LLM automatically ***

To configure UART and RS485 on a custom Jetson Orin Nano, you’ll need to follow these steps:

  1. UART Configuration:
    • First, ensure that the UART is enabled on the Jetson Orin Nano. You can do this by checking the device tree configuration. The device tree file for the Jetson Orin Nano is usually located at /boot/dtb/tegra234-p3701-0000-p3737-0000.dtb.
    • Use the dtc command to decompile the device tree file and check if the UART is enabled. For example:
dtc -I dtb -O dts /boot/dtb/tegra234-p3701-0000-p3737-0000.dtb > tegra234-p3701-0000-p3737-0000.dts
* In the decompiled device tree file, search for the UART node (e.g., `uart@3100000`). Make sure that the `status` property is set to `"okay"` or `"enabled"`.
  1. RS485 Configuration:
    • To enable RS485 on the Jetson Orin Nano, you’ll need to configure the UART to use RS485 mode. This can be done by modifying the device tree file.
    • Add the following properties to the UART node:
rs485-rts-active-low;
rs485-rx-during-tx;
rs485-rts-delay = <0 0>;
* Save the changes and recompile the device tree file using the `dtc` command.
  1. UART and RS485 Pin Configuration:
    • Ensure that the UART and RS485 pins are correctly configured on your custom Jetson Orin Nano board. The pinout for the Jetson Orin Nano is available in the NVIDIA documentation.
    • Verify that the UART and RS485 pins are connected to the correct pins on your RS485 adapter.
  2. Minicom Configuration:
    • To test the UART and RS485 configuration, use a serial console program like Minicom.
    • Configure Minicom to use the correct UART device (e.g., /dev/ttyTHS1) and baud rate (e.g., 9600).
    • Set the serial port to use RS485 mode by adding the following command to the Minicom configuration file (usually ~/.minirc.dfl):
pu port /dev/ttyTHS1
pu baudrate 9600
pu bits 8
pu parity N
pu stopbits 1
pu rtscts yes
* Save the changes and restart Minicom.

Comparison with Other Jetson Modules:

  • The UART and RS485 configuration process is similar for other Jetson modules, such as the Jetson Xavier NX and Jetson AGX Orin.
  • However, the device tree file and pinout may differ between modules. Be sure to consult the relevant documentation for your specific Jetson module.

Troubleshooting Tips:

  • If you’re experiencing issues with UART or RS485 communication, try disabling RS485 and testing the UART connection only.
  • Verify that the RS485 adapter is correctly connected to the Jetson Orin Nano and that the pinout is correct.
  • Check the serial console output for any error messages or warnings related to UART or RS485 configuration.

By following these steps and troubleshooting tips, you should be able to configure UART and RS485 on your custom Jetson Orin Nano and establish communication with your laptop via the RS485 adapter.

*** Please give the thumbs up if you get answers you like. Or provide feedback to help us improve the answer. ***

After Step1 it gives this UART enabled (UART config)

After step 2 (RS485 config) the RS485 is not enabled. why?

Hi thaseen,

What’s the Jetpack version in use?

Which UART interface are you using? UART1!?
Have you verified the UART loopback test through shorting TX/RX before use it for RS485?

Hi Kevin,

JetPack version: R36 (release), REVISION: 5.0 (JetPack 6.2)
UART interface: UART1 → /dev/ttyTHS1

We have not done the UART loopback test yet.
Our board is a custom carrier board
which has MAX485ESA+T transceiver built in, connected to
UART1 with RTS pin controlling DE/RE.

We configured RS485 in device tree but ioctl TIOCSRS485
returns False. We found CONFIG_SERIAL_RS485 is not set
in the JetPack 6 kernel.

Should we recompile the kernel with RS485 support or
is there another way?

I would suggest verifying this before using it for custom use case like RS485 to ensure that you have configure it correctly.

Do you use RTS only?
Please note that the RTS logic operates inversely compared to RE/DE of RS485.

Yes, please refer to Kernel Customization — NVIDIA Jetson Linux Developer Guide to sync and build kernel to enable that config for RS485.

  1. But I am not able to verify the uart because i cannot have pure uart pins in our custom board. (Uart soldered with max485 in the board)!!

  2. what are all the things i have to enable?

  3. i am not able to sync build kernel SEE the picture I TRIED TO RECOMPILE THE KERNEL BUT THERE IS NO RS485 IS THERE

This confirms it — SERIAL_RS485 does not exist in this kernel source at all. The Tegra UART driver simply doesn’t have RS485 support code.

Hi Kevin,

We followed the Kernel Customization guide and
searched for SERIAL_RS485 in menuconfig but got
“No matches found”.

It appears the serial-tegra driver does not have
RS485 support in the kernel source
(linux-jammy, jetson_36.5 tag).

Is there a patch or alternative way to enable
RS485 on ttyTHS1 with JetPack 6?

Or should we use software GPIO to control the
DE/RE pin manually?

Okay, I just expect that you have verified UART loopback test before connecting with other device like max485.
There may be the board in early stage allowing you to verify this.

  1. pinmux configuration for UART
  2. device tree configuration
  3. revert the behavior of RTS to make it work with RS485, you can refer to the following thread.
    Need to Invert UART2 RTS - #11 by KevinFFF

Maybe you can just use current serial-tegra driver for your RS485 use case.

They should be connected to RTS for the flow control, please refer to the link I shared to invert the behavior of RTS.

i am not able to test uart with rs485 because that one was soldered internally and one more thing if i have to config rs485 minicom what are all the things i have to config because if i enabled the hardware flow control yes and other things yes means it gives automatically garbage values more without typing and if i type means nothing will come

Do you mean there’re the garbled messages rather than nothing?
If so, I would suggest confirming the baudrate used in your case.

Please also get a LA or scope to check the signal.

Both sides i set 115200 and without typing it gives garbage values when i set hardware flow control to yes after garbage values if i typed means nothing is coming

Have you checked this?

Please also share the block diagram of your connection for further check.

You cannot directly connect rs485 to the uart, it requires a differential driver(electrical layer). Simplest route is use a usb to rs485 adapter.

No i am using our custom jetson orin nano. In that board we are designed internally with RS485 driver

Please share the block diagram of your connection between UART interface(from Orin Nano) to RS485 module.

In addition, is there any error reported in dmesg?

To use RTS for RS-485 transaction, you need to invert the behavior of RTS.
Please refer to the following thread for details:
Need to Invert UART2 RTS - #11 by KevinFFF

Have you updated the register for RTS as I have shared this thread before?

i dont know which register i have to give to invert the RTS signals because i am using the UART1

The UART_IRDA_CSR_0 of UARTA(i.e. UART1) in your case should be 0x3100020.
You can get more details from 9.7.2.22 IRDA_CSR Register (UART_IRDA_CSR_0) in TRM document of Orin.

AFTER U SUGGESTED STEP OF ABOVE I DID THE SAME THING CHECK BELOW OF MINE

and jetson to lap it gives the garbage values see below

Have you configured the register to invert RTS?

I would suggest verifying loopback test before connecting to your RS485 device.