Hi all
I just got my TX2, and flashed the latest version of the firmware via JetPack. I need to use the hardware serial ports (UART) in my application - I cannot use a USB to serial converter, or SPI/I2C. I’ve looked through the forums for examples of how to use the hardware UARTs, and they say that /dev/ttyTHS2 is connected to the hardware serial port on J17. /dev/ttyTHS1 is the one on J21 which is used for the serial console, and /dev/ttyTHS3 is for the camera module. I’d like to use /dev/ttyTHS2, but it doesn’t appear in /dev:
$ls /dev
8030000.etf emc_freq_min i2c-8 mmcblk0 mmcblk0rpmb nvhost-nvdec rfkill tegra-vi0-channel10 tty15 tty31 tty48 tty7 vcs3 vcsa8
autofs fb0 iio:device0 mmcblk0p1 net nvhost-nvjpg rtc tegra-vi0-channel11 tty16 tty32 tty49 tty8 vcs4 vcsa9
block fd iio:device1 mmcblk0p10 network_latency nvhost-prof-gpu rtc0 tegra-vi0-channel2 tty17 tty33 tty5 tty9 vcs5 watchdog
bus full iio:device2 mmcblk0p11 network_throughput nvhost-sched-gpu rtc1 tegra-vi0-channel3 tty18 tty34 tty50 ttyS0 vcs6 watchdog0
camchar-dbg fuse iio:device3 mmcblk0p12 null nvhost-tsec shm tegra-vi0-channel4 tty19 tty35 tty51 ttyS1 vcs7 zero
camchar-echo gpu_freq_max initctl mmcblk0p13 nvhost-as-gpu nvhost-tsecb snd tegra-vi0-channel5 tty2 tty36 tty52 ttyS2 vcs8
char gpu_freq_min input mmcblk0p14 nvhost-ctrl nvhost-tsg-gpu stderr tegra-vi0-channel6 tty20 tty37 tty53 ttyS3 vcs9
cluster0_freq_max hidraw0 keychord mmcblk0p15 nvhost-ctrl-gpu nvhost-vi stdin tegra-vi0-channel7 tty21 tty38 tty54 ttyTHS1 vcsa
cluster0_freq_min hidraw1 kmsg mmcblk0p16 nvhost-ctrl-isp nvhost-vic stdout tegra-vi0-channel8 tty22 tty39 tty55 ttyTHS3 vcsa1
cluster1_freq_max hidraw2 log mmcblk0p17 nvhost-ctrl-nvcsi nvmap sw_sync tegra-vi0-channel9 tty23 tty4 tty56 uhid vcsa10
cluster1_freq_min i2c-0 mapper mmcblk0p2 nvhost-ctrl-nvdec port tegra_camera_ctrl tty tty24 tty40 tty57 uinput vcsa11
console i2c-1 max_cpu_power mmcblk0p3 nvhost-ctrl-vi ppp tegra-crypto tty0 tty25 tty41 tty58 urandom vcsa12
constraint_cluster0_freq i2c-2 max_gpu_power mmcblk0p4 nvhost-ctxsw-gpu ptmx tegra_dc_0 tty1 tty26 tty42 tty59 vcs vcsa2
constraint_cluster1_freq i2c-3 max_online_cpus mmcblk0p5 nvhost-dbg-gpu ptp0 tegra_dc_ctrl tty10 tty27 tty43 tty6 vcs1 vcsa3
constraint_gpu_freq i2c-4 media0 mmcblk0p6 nvhost-gpu pts tegra_mipi_cal tty11 tty28 tty44 tty60 vcs10 vcsa4
constraint_online_cpus i2c-5 mem mmcblk0p7 nvhost-isp quadd tegra-throughput tty12 tty29 tty45 tty61 vcs11 vcsa5
cpu_dma_latency i2c-6 memory_bandwidth mmcblk0p8 nvhost-msenc quadd_auth tegra-vi0-channel0 tty13 tty3 tty46 tty62 vcs12 vcsa6
disk i2c-7 min_online_cpus mmcblk0p9 nvhost-nvcsi random tegra-vi0-channel1 tty14 tty30 tty47 tty63 vcs2 vcsa7
Also, when I do dmseg | grep tty, I don’t see anything related to /dev/ttyTHS2
$ dmesg | grep tty
[ 0.000000] Kernel command line: fbcon=map:0 net.ifnames=0 console=tty0 OS=l4t console=ttyS0,115200n8 memtype=0 video=tegrafb no_console_suspend=1 earlycon=uart8250,mmio32,0x03100000 gpt tegraid=18.1.2.0.0 tegra_keep_boot_clocks maxcpus=6 android.kerneltype=normal androidboot.serialno=0335115020673 vpr_resize root=/dev/mmcblk0p1 rw rootwait
[ 0.022458] console [tty0] enabled
[ 1.938271] console [ttyS0] disabled
[ 2.348530] 3100000.serial: ttyS0 at MMIO 0x3100000 (irq = 36, base_baud = 25500000) is a Tegra
[ 2.521549] console [ttyS0] enabled
[ 2.538637] 3110000.serial: ttyTHS1 at MMIO 0x3110000 (irq = 37, base_baud = 0) is a TEGRA_UART
[ 2.553953] 3130000.serial: ttyTHS3 at MMIO 0x3130000 (irq = 38, base_baud = 0) is a TEGRA_UART
[ 12.893261] systemd[1]: Created slice system-getty.slice.
[ 13.091220] systemd[1]: Created slice system-serial\x2dgetty.slice.
Can someone tell me how to
- Enable /dev/ttyTHS2 so I can use j17 as a UART?
- Use one of the other two ports as a UART? I tried connecting pins 8 and 10 on J21, but was unable to send data back and fourth over ttyTHS1.