NVIDIA Jetson TX2 NX Getting Started for DSBOARD-NX2 - Forecr.io

NVIDIA Jetson TX2 NX Getting Started for DSBOARD-NX2

Jetson Nano | Jetson TX2 NX | Jetson Xavier NX

06 April 2021
WHAT YOU WILL LEARN?

1- The pinout of I/O connector  

2- Power socket polarization  

3- Examples of I/O connector 

ENVIRONMENT

Hardware: DSBOARD-NX2 (Rev. 1.1)

OS: 

Language: 


This blog post is suitable for:

• DSBOARD-NX2 (Rev. 1.1) with Jetson TX2 NX SOM

• DSBOX-TX2NX


DSBOARD-NX2 is industrial carrier board for NVIDIA Jetson TX2 NX/ Nano/ Xavier NX . We will explain how to get started with Jetson TX2 NX on this blog post.


Before you plug in DC power cable, you should plug in Ethernet cable, keyboard and mouse’s USB cables to USB ports, HDMI cable to HDMI port socket for monitoring the system and the Jetson TX2 NX module to its socket.


Power socket polarization 


After connections are done, you can plug in the DC power cable to “DC IN” socket. The DC Power Source should be in the range of 9-28 Volt DC. If you have auto power version device, the system runs as soon as you plug the DC power cable. If you have other version, you should press power button which is located on the front side.

You can see the power connector pinout below. First and third pins are positive polarization, second and fourth pins are negative polarization.



After you energize the board, the system runs. The industrial box PC has preinstalled operating system (Ubuntu 18.04) (the user name and the password are “nvidia”).


If you would like to upgrade or downgrade the software version, please click here.


The pinout of I/O connector  


Examples of I/O connector 


CAN Bus Interface


First, let's look the I/O connector. On the connector, there are 2 pins for CAN Bus and 1 for isolated ground. When using CAN Bus always double check which ground pin you are using. You must use digital ground for CAN Bus applications.

To test CAN Bus functionality, we used USB-CAN adapter. Connect that adapter to the USB port of the host PC and install its driver software if necessary. To the other side of the adapter connect your device’s CAN pins.


On next step, activate CAN drivers and activate CAN interface with “ip link” command. On host side, be sure that you are using same bitrate with your device.

• sudo modprobe can

• sudo modprobe can-raw

• sudo modprobe mttcan

• sudo ip link set can0 up type can bitrate 500000


Lastly, you can use can-utils tools to communicate.

Use cangen to write random data:

• cangen can0 -v



Use cansend to write data:

• cansend can0 123#1122334455667788



Use candump to listen bus:

• candump can0



IIO (Industrial Input Output) Interface


On the IO connector, there are 3 isolated outputs, 2 isolated inputs and 1 isolated ground. Also, you can get 2 more isolated input pins with simple hardware rework. When using IIO always double check which ground pin you are using. You must use isolated ground for IIO applications.


Digital IN0 Test



Find sysfs equivalent of the connected input pin from the table. For this setup it is gpio-248. After proper hardware connection, we can continue on the software side.



Set gpio248 (DIGITAL_IN0) as input and read sensor value. To do this, you could use the commands below.

• sudo echo 248 > /sys/class/gpio/export

• sudo echo in > /sys/class/gpio/gpio248/direction

• sudo cat /sys/class/gpio/gpio248/value



Digital OUT0 Test


Find sysfs equivalent of the connected output pin from the table below. For this setup it is gpio-252. After proper hardware connection, we can continue on the software side.


Then set gpio252 (DIGITAL_OUT0) as output and control light state. To do this, you could use the commands below.

• sudo echo 252 > /sys/class/gpio/export

• sudo echo out > /sys/class/gpio/gpio252/direction


To short Output

• sudo echo 1 > /sys/class/gpio/gpio252/value


To open Output

• sudo echo 0 > /sys/class/gpio/gpio252/value



Serial Communication Interfaces


To test all serial communication interfaces, open new terminal and install GtkTerm program for ease of use (make sure Ethernet cable is connected). Then run GtkTerm program with arguments. On host side, you can use TeraTerm or Putty for Windows; GtkTerm for Ubuntu OS. You can install GtkTerm with this terminal command:

• sudo apt install gtkterm



RS232 Test


To test RS232 functionality, we used USB-Serial adapter. Connect that adapter to the USB port of the host PC and install its driver software if necessary. To the other side of the adapter connect your device’s RS232 pins with cross connection (Rx to Tx, Tx to Rx). You can find the hardware pins below. For ground connection, use GND_DIGITAL pin.



After proper connection, you should do pin muxing on your device to use Serial Port as RS232. To do this open new terminal then type these commands below.

• sudo echo 264 > /sys/class/gpio/export

• sudo echo 396 > /sys/class/gpio/export

• sudo echo out > /sys/class/gpio/gpio264/direction

• sudo echo out > /sys/class/gpio/gpio396/direction

• sudo echo 0 > /sys/class/gpio/gpio264/value

• sudo echo 0 > /sys/class/gpio/gpio396/value


If you are using GtkTerm on Ubuntu, run these commands below. If you have done everything correctly you could see your keyboard presses on the other machine's serial terminal.

• sudo gtkterm -p /dev/ttyTHS2 -s 115200


RS422 Test


To test RS422 functionality, we used USB-Serial adapter. Connect that adapter to the USB port of the host PC and install its driver software if necessary. To the other side of the adapter connect your device’s RS422 pins with cross connection (Rx to Tx, Tx to Rx but positive to positive, negative to negative). You can find the hardware pins below. For ground connection, use GND_DIGITAL pin.



After proper connection, you should do pin muxing on your device to use Serial Port as RS422. To do this open new terminal then type these commands below.

• sudo echo 264 > /sys/class/gpio/export

• sudo echo 396 > /sys/class/gpio/export

• sudo echo out > /sys/class/gpio/gpio264/direction

• sudo echo out > /sys/class/gpio/gpio396/direction

• sudo echo 0 > /sys/class/gpio/gpio264/value

• sudo echo 1 > /sys/class/gpio/gpio396/value


If you are using GtkTerm on Ubuntu, run these commands below. If you have done everything correctly you could see your keyboard presses on the other machine's serial terminal.

• sudo gtkterm -p /dev/ttyTHS2 -s 115200



RS485 Test


To test RS485 functionality, we used USB-Serial adapter. Connect that adapter to the USB port of the host PC and install its driver software if necessary. To the other side of the adapter connect your device’s RS485 pins. You can find the hardware pins below. For ground connection, use GND_DIGITAL pin.




After proper connection, you should do pin muxing on your device to use Serial Port as RS485. To do this open new terminal then type these commands below.

• sudo echo 340 > /sys/class/gpio/export

• sudo echo 264 > /sys/class/gpio/export

• sudo echo 396 > /sys/class/gpio/export

• sudo echo out > /sys/class/gpio/gpio340/direction

• sudo echo out > /sys/class/gpio/gpio264/direction

• sudo echo out > /sys/class/gpio/gpio396/direction

• sudo echo 1 > /sys/class/gpio/gpio264/value

• sudo echo 1 > /sys/class/gpio/gpio396/value

To Write Data

• sudo echo 1 > /sys/class/gpio/gpio340/value

To Read Data

• sudo echo 0 > /sys/class/gpio/gpio340/value


If you are using GtkTerm on Ubuntu, run these commands below. If you have done everything correctly you could see your keyboard presses on the other machine's serial terminal.

• sudo gtkterm -p /dev/ttyTHS2 -s 115200 -w RS485


Thank you for reading our blog post.