How do The UART port in TX2 convert to RS232???

Hello,Specialist

I have a nvidia JETSON TX2 , and there is a 6 pin UART port in the circuit board.
Now I have a device that transmits data from RS232 port,but I didn’t find RS232 port in the board.

Questions:
1.Can the UART port convert to RS232 port?

2.If yes,how can I convert the UART port to RS232 port?

Thanks very mach!

You need an additional chip to translate between the RS-232 signals and the TTL-level UART signals.
Most people find the MAX3232 to be a suitable chip (it also needs a small amount of other components.)

Another alternative is to get a USB RS-232 adapter and talk to the external RS-232 device that way.

snarky,thanks for your support!

I don’t know how to use additional chip to translate between the RS-232 signals and the TTL-level UART signals.
Is there any existing device?
If yes,could you send me some information about the device,e.g.picture,document?

Thanks

You can use any 3.3V (TTL level) USB serial UART adapter. Here’s an example which can plug directly into the J17 connector’s standard layout:
[url]https://www.digikey.com/product-detail/en/TTL-232R-3V3/768-1015-ND/1836393[/url]

If the serial USB-to-UART cable uses an FTDI chipset, then I would expect any host PC to already have the driver in place.

@jacky Examples of ready-made boards with the translator on it are here:

If you instead want to plug a RS-232 converter into the USB bus on the Jetson, and use the USB serial port, you can use this:

@linuxdev,@snarky,thanks for your help!

@snarky,if I use the “uxcell® MAX232CSE Transfer Chip RS232 To TTL Converter Module COM Serial Board”,the UART port is 6 pins and the Chip is 4 pins.How could I connect the two devices?

If I use the UART port convert to RS232,how could I operate the port and get the data from the port?

Which file in the dir “/dev” is the port?

Those are much more general Linux questions, which aren’t specific to the Jetson.
There are lots of good tutorials for how to program serial ports on Linux.
For example:

http://www.tldp.org/HOWTO/Serial-Programming-HOWTO/

FYI, the serial UART interfaces on the Jetson are 3.3V (“TTL”) level, not the general RS232 levels. You’ll see USB serial UARTS listed in shops that sell them with a listing of what voltage they support. The 6-pin adapters (such as the one I mentioned from digikey) are wired to match J17. You can use them on any header by matching its TX to board RX, its GND to board GND, its CTS to its RTS, its RTS to its CTS. CTS/RTS are not needed if software flow control is used. Here is some info on the J21 connector (but beware on a TX2 hardware flow control via CTS/RTS does not work):
[url]http://elinux.org/Jetson/TX1_Serial_Console[/url]
[url]http://www.jetsonhacks.com/2015/12/01/serial-console-nvidia-jetson-tx1/[/url]

J17 is just a standard layout, but otherwise the same as the J21 connector if you rearrange pins.

@snarky,thanks very much!I learn from your so much!

I have another question want to ask.

Could you teach me ,the 6 pins UART port, what do very pin do?

Thanks very much!

Let’s say this forum didn’t exist.
How would you answer that question yourself?
What have you already tried yourself, to answer this question, and why didn’t that work?

@snarky thanks for your help!

I will try to answer the question.

Hi linuxdev,

I’m confused by this. The nvidia documentation (ex: TX2 module datasheet and customer pinmux) seems to say that the voltage level for UART pins are all 1.8 V. Wouldn’t a level shifter be required to use a 3.3 V interface?

The schematic shows a level shifter for J17 (the pin header,) whereas J21 (the camera connector) is at 1.8V.
I’m running J17 at 3.3V, and it works great so far.
(Also, it seems the stock camera doesn’t actually use the UART, as I’ve seen no interference with the signals and my protocol.)

Snarky,

Thanks for the help! I hadn’t seen that. One more clarification: I could be wrong because I haven’t really gotten a handle on all the numbering, but do you have the J numbers backwards? I’m looking at page 66 of the OEM Product Design Guide, which shows a level shifter attached to UART0/UART1 (?), which I think is the UART on the J21 GPIO header.
Also, I thought using J17 required removal of the camera, but you’re saying I don’t need to?

Thanks,
always_sunny

EDIT: apparently filtering your search to only hardware->schematics removes their schematic files from the results… I found them now. For posterity’s sake, I believe the descriptions were backwards (J21 is the GPIO pin header).
Thanks again for your help, snarky!

J21 is wired for serial console (it would take effort to change to something else because even U-Boot is by default using this for serial console). There are of course many functions to different pins on J21 which are unrelated to the serial UART. This is “/dev/ttyS0”.

J17 also connects to the camera module, though I don’t think it is used by default…it tends to work fine without much effort. You could remove the camera module if you want to guarantee it isn’t touching J17 (it just uses two phillips screws…make sure power is off and you’ve drained any caps, e.g., by holding the power button down for several seconds after the power connector is removed). This is “/dev/ttyTHS2”.

The “ttyS#” are standard serial UART drivers, the “ttyTHS#” entries actually have a DMA-capable driver behind the scenes. Both work mostly the same way although there will be some IOCTL calls which differ if you are programming at a low level.

As an example you could wire J17’s RX and TX pins together, and then use a serial terminal running at 115200 8N1 with software (no) flow control and the terminal would echo to itself.

The six-pin header has a level shifter. The camera port does not.

They both connect to the same UART (ttyTHS2) but according to my testing, the camera does not actually use those signals, so you can just use it through the J17 pin header without removing the camera.

http://developer.download.nvidia.com/assets/embedded/secure/jetson/TX2/docs/JetsonTX1_TX2_Developer_Kit_Carrier_Board_Specification.pdf