Serial to USB

Hey guys,

was anyone able to get a signal from the 6 pin serial connector?
I am using a “Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC” device.

I have seen on youtube (http://jetsonhacks.com/2015/12/01/serial-console-nvidia-jetson-tx1/)
that someone was using the GPIO extension headers for this. That is a little confusing as there is a dedicated UART port.

What is the correct way to access the serial output during boot?

Edit: Nevermind, my colleague in the meantime just tried it with the GPIO, seems to work now. Can anyone explain why it does not work with the header which seems to be intended for serial communication anyway?

This particular UART is not the serial console. Serial console UART is from J21 connector. See:
http://elinux.org/Jetson_TX1#Serial_Console_Wiring

The 6-pin header is simply for other general use.

I see, thanks for the info!

Hi linuxdev,

Can i know how to use The 6-pin header UART ? And what is general use do you mean ?

Thank u

The 6-pin header is wired to the camera connector (apparently cameras can use a serial interface for some control). You could remove the camera and then use the 6-pin header for other purposes, but it is not set up as serial console. You could send or receive data on the 6-pin header that way…but other than the camera, nothing is currently set up to care about that serial device.

Thank you Linuxdev for quickly response.
Now I have a device and i decided to connect it to 6 pin header. what is your recommendation about that ? what I should thinking about when i want to use UART Peripheral??And what does it mean it is not set up to serial console,Where the issue ?

and if there is driver for uart please give me it’s link.

thank you for your efforts appreciate that.

Serial communications is just talking to the right “/dev/WhateverSerialDevice#”, e.g., serial console is “/dev/ttyS0”, directly attached console during boot is “/dev/tty0” (these are assigned in “/boot/extlinux/extlinux.conf” as an argument passed to the kernel). Each “/dev” tty file is really the interface to a driver. It just happens that by default “/dev/ttyTHS2” is the driver attached to the 6-pin serial UART header. If you have a single USB serial UART plugged into the Jetson, then it would probably produce “/dev/ttyUSB0” (and it would go away when the USB device is unplugged).

A simple example is that on the Jetson you can plug in a USB serial UART (preferably FTDI chipset since these just always work), and the 6-pin TTL level (3.3V) end goes to the 6-pin header (note that a DB-9 serial header has a number of valid voltage ranges, but serial console and the 6-pin header both demand exactly 3.3V TTL logic level…others will fail or cause damage by using the wrong voltage). You could then open two serial console programs, e.g., minicom or gtkterm, point one at “/dev/ttyUSB0”, and the other at “/dev/ttyTHS2”, and if you type into one terminal, the text appears on the other. This is the Jetson talking to itself, but each end could actually be on different computers.

In that example it assumes serial ports and serial console programs are all set to the same speed and compatible in any other setting, e.g., parity (not doing this means either not seeing any output, or seeing garbage output). Some of those settings are for hardware, others are for the program interpreting the hardware. IOCTL commands are used if programming directly in C language. Some utility programs are able to query or set things as well, e.g., setserial. Do note though that serial devices are not plug-n-play, so they cannot actually be queried for their settings most of the time…what’s usually being queried is the driver, so it is possible to see a setting which does not actually function despite appearances.

Serial console and many programs will operate at speed 115200, 8 bits, 1 stop bit, no parity. If more than 3 wires are used, then flow control would be CTS/DTS; if only 3 wires are used, then flow control would be software. minicom and gtkterm allow setting these through their interfaces.

In terms of “/dev” naming conventions, any “/dev/ttyNumber” is a directly attached serial device; “/dev/ttyUSBNumber” would be a serial device via a USB serial UART; “/dev/pts/Number” would be a pseudo terminal (not associated with hardware, but instead a child of another terminal, e.g., in X11 GUI a terminal is a pty instead of tty); any “/dev/ttyTHSNumber” would be the same as a “/dev/ttyNumber”, except that the driver is nVidia’s driver and offers some DMA performance advantages.

There are a lot of examples and tutorials out on the internet. Just look for information on serial port programming under Linux (it happens to be a POSIX standard, so mostly it is portable across various flavors of *NIX). You’ll find it is divided into opening/closing the device like a file, controlling settings via ioctl calls, and actually transferring data.

thank you for very useful information

but i need to know please j17 is uart3 is 6 pin header all the same?
,And is camera that coming with tegra tx1 is connected to 6 pin header ? if yes,How can i disconnect the connection between j17 and camera serial port

regards

The camera is a removable module. Just remove the two camera mounting screws and it lifts straight up.

J17 is the 6-pin header. The schematic labels it as UART1, but it probably has another designation when it reaches the TX1 module (the carrier board schematic and the module board probably label things differently…the TRM reference would be consistent with the module, not the carrier board). The UART is associated with “/dev/ttyTHS2”.

The carrier board UART1 (J17) TX/RX corresponds to pins 61 and 63 of the module…anyone know which UART this is listed as under the TRM?

UART1(J17) is from TX1_UART3, it is UARTC(U3C) in pinmux, The Bus Name is ttyTHS2 and Node in DTS is serial@700006200

Hi,

thank you linuxdev for all your efforts.

edli, Could you please give me complete datasheet for tx1 and have all information ?

Regards,

For many docs go here and just select platform:
https://developer.nvidia.com/embedded/downloads

The Technical Reference Manual (TRM) contains details of the TX1; carrier board docs also exist for that part of the info.