RS485 no Communication on Jetson Orin Nx Custom Carrier Board

I am trying to communicate with PC using USB-RS485 connector. I opened sudo minicom -D /dev/ttyTHS1 but there is nothing I can send or receive on either PC or jetson.
I have performed the following Solution but no Avail. Kindly if possible clear my understanding what did i do wrong.
#checked the device tree settings RS485 pin PX06 is enabled as Output
uart2_rts_px6 {
nvidia,pins = “uart2_rts_px6”;
nvidia,function = “uartb”;
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
nvidia,enable-input = <TEGRA_PIN_DISABLE>;
nvidia,lpdr = <TEGRA_PIN_DISABLE>;
};
set the gpio using libgpio to output
sudo gpioset gpiochip0 120=1

but when i do gpioget the output return Zero

used pyhton library

##usefull link about the gpio I found

#as per the link libgpio is the method for JETPACk 6 latest kernel
so i M doing write but it doesn’t change the value
sudo gpioset gpiochip0 120=1
###tried Disabling getty but still no Lead
systemctl stop nvgetty
systemctl disable nvgetty

Output from /sys/kernel/debug/2***.pinmux/pinconf-group
90 (uart2_rts_px6):
pull=0
tristate=0
enable-input=0
open-drain=0
io-reset=0
rcv-sel=0
io-hv=0
schmitt=0
pull-down-strength=0
pull-up-strength=0
drive-type=0
gpio-mode=1
function=uartb

hello zawarkhan97,

would you like to access to the serial console?
please refer to Jetson Orin Nano Developer Kit Carrier Board Specification, you may check [Table 3-4. Button Header Description – J14] for using pin-3/4 to access to the target for debugging.

Thanks for the prompt response @JerryChang . I actually want use RS485 ttyTHS1 for sending commands

hello zawarkhan97,

could you please also share your hardware connection, or, taking a snapshot for quick checking.

The problem is I unable to see the output in another GPIO as well not only RS485 (PZ.05) but also on GPIO(PX.06). let me share the hardware connection diagram…RS485 A is with A and Rs485 Differential B is with B.

please refer to Topic 301171, there’s patch to address the issue cannot control GPIO in JP-6.


zawarkhan97

32m

I applied the Patch and rebuilt the kernel But it seems to be not working. I have cooler on that pin and it once turned on doesnt turn off.
sudo gpioset -m wait ''gpiofind “PZ.05”=1

sudo gpioset -m wait ''gpiofind “PZ.05”=0

I guess it takes time to take effect

Sorry edit : reset doesnt work i want to toggle it. But once its set to 1 it doesnt set to 0 then.
Further on reboot the Gpio infor shows it as input

waiting for response @JerryChang …Help would be appreciated

is there a method to change the pinmux dtb after flashing. I wasnt able to find this dtb in any folder tegra234-mb1-bct-pinmux-p3767-dp-a03

hello zawarkhan97,

>> Q1
you’ll need to add wait to keep the pin state,
for instance, # gpioset --mode=wait gpiochip0 135=1.

>> Q2
did you searching on the target?
you should see this from the Jetpack installation path.
for instance, $OUT/Linux_for_Tegra/bootloader/generic/BCT/tegra234-mb1-bct-pinmux-p3767-dp-a03.dtsi

I am using wait argument.But it doesnt help brother. For pin mux I am searching inside the running target kernel

hello zawarkhan97,

pin state will resume once you leaving gpioset.
you should searching mb1-bct from your host machine.

1 Like