Jetson Nano – UART

2023-05-16

There is a UART on the J41 GPIO Header of the NVIDIA Jetson Nano Developer Kit. Useful when you need a little bit of extra serial connectivity action. Looky here:

 

Background

There are two UARTs on the Jetson Nano. We have an article about the Serial Debug Console which is on the J44 header. The Serial Debug Console is useful for many tasks, including helping with start-up issues.

The second UART, which we are writing about here, is on the J41 header. This is what you consider a general purpose UART, with no special assigned function. However, there is an assumption about its use which may confuse folks who aren’t in the know.

When the Jetson starts up it opens a Serial Console on the J41 UART as a service. You can observe the console by simply wiring the Nano to another computer, either through another UART or a TTL to USB cable. Then open up a serial communications program and power on the Jetson. You will see the familiar login prompt from the Jetson.

This may not be the behavior you desire. For example, if you are interfacing with a micro-controller such as an Arduino or another device, you may want to just pass data back and forth. The Serial Console is in the way, and can lead to some strange data. The answer is simple, you need to stop the Serial Console on the UART.

Installation

The J41 UART is a 3.3V TTL signal. An easy way to communicate with the UART from another computer is via a TTL to USB Serial Cable. In the video, we use an Adafruit USB to TTL Serial Cable – Debug / Console Cable [954] available from Amazon. Most computers have a USB port, just plug the cable into the USB port.

If you are using the UART as a Serial Console, you’re almost done. You just need to run a serial terminal program on the machine that you are connecting to the Jetson. In the video, we use PuTTY on a Windows 10 PC. We start PuTTY and select Serial with 115200 baud, 8 bits, no parity, 1 stop bit.

You can plug the UART into another TTL type of device by just wiring the two directly together, but note the 3.3V signal. Many serial devices, such as some Arduinos, use 5V. The Jetson Nano is not tolerant of 5V, and if you connect directly bad things can happen. If you are using a 5V device with the Jetson Nano, you will need to do some level shifting to get the levels to match.

Also, remember to “crossover” the connections. Transmit (TXD – Transmit Data) goes to Receive (RXD – Receive Data) from the Jetson to the other machine/device. Similarly, Receive (RXD) goes to Transmit (TXD).

Wiring

The wiring is straightforward. Make sure that the Nano is disconnected from any power source and wire:

Jetson Nano J41 Pin 8 (TXD) → Cable RXD (White Wire)
Jetson Nano J41 Pin 10 (RXD) → Cable TXD (Green Wire)
Jetson Nano J4 Pin 6 (GND) → Cable GND (Black Wire)

Note: The color of the wires on your cable may be different.

The pinout of the J41 Header is available on JetsonHacks. The Jetson Nano J41 pins are also silkscreened on the underside of the board. The UART is on /dev/ttyTHS1.  After wiring, it should looks something like this:

 

 

 

 

Jetson Nano UART on J41

Software

On the JetsonHacksNano account on Github, there is a repository UARTDemo. From a Terminal, clone the repository:

$ git clone https://github.com/JetsonHacksNano/UARTDemo

$ cd UARTDemo

If you do not intend to use the Serial Console on the UART, you should disable the Serial Console:

$ systemctl stop nvgetty 
$ systemctl disable nvgetty 
$ udevadm trigger

# You may want to reboot instead

The Demo Script requires py-serial. To install py-serial:

$ sudo apt-get install python3-serial

Now you are ready to run the Demo Script. Make sure that you have a Serial Terminal running on the computer that you connect to the Jetson. Connection speed is 115200, with 8 bits, no parity, and 1 stop bit (115200 8N1). Then run the script on the Jetson:

$ sudo python3 uart_example.py

On the connected machine, you should see a short identification when you connect. When you type on the machine, you should see the characters echo back (as if you are typing the character directly). The machine sends a character to the Jetson, the script reads the character and sends it back (we call this an echo).

In the video, we read through the script to get a feel for how it operates.

Conclusion

This should be a start on how to use the UART. The applications that you write can be very simple, or complex depending on the capabilities of the device that you attach.

As a special note, there are no serial/cereal jokes in this article because we use the monthly allotment in the video.

Notes

Tested on:

  • Jetson Nano
  • L4T 32.2.1
  • JetPack 4.2.2
  • Adafruit USB to TTL Serial Cable – Debug / Console Cable [954]
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Jetson Nano – UART 的相关文章

  • Jetson TX2 入门 ——介绍

    暑假留校 xff0c 老师给我们拿了两块开发板 xff0c 一个是英伟达的Jetson TX2 xff0c 一个是up squared xff0c 让我们先熟悉开发板 xff0c 为明年的比赛做准备 这两个板子是前几届学长做比赛用过的 自己
  • 在Jetson Nano上编译FastDeploy

    1 C 43 43 库的编译 span class token function git span clone https github com PaddlePaddle FastDeploy git span class token bu
  • arduino学习——UART串口通信

    Serial begin 初始化串口 用作串口的启动 xff0c 常放置在setup xff08 xff09 中 原型 xff1a Serial begin speed Serial begin speed config 参数 xff1a
  • UART串口通信

    目录 一 通信特点二 通信应用三 接线示意图三 UART通信协议四 STM32F4 串口使用1 资源分布2 特性3 UART框图4 使用方法5 相关库函数6 函数实例 五 实战 上位机控制开发板小灯 一 通信特点 异步 串行 全双工 一般描
  • UART串口通信协议概述

    1 UART协议介绍 UART是一种通用串行数据总线 xff0c 用于异步通信 UART能实现双向通信 xff0c 在嵌入式设计中 xff0c 常用于主机与辅助设备通信 UART包括RS232 RS449 RS423等接口标准规范和总线标准
  • 在Jetson Nano上实现单目相机 apritag_ros识别

    一 xff0c apritag ros安装 最开始采用克隆源码编译的方式进行安装 xff0c 后来在Jetson nano上有opencv4与opencv3的依赖问题 xff0c 后来索性直接采用二进制安装 xff1a sudo apt g
  • 英伟达Jetson Nano 开发(2)、Jupyter-Lab配置

    英伟达Jetson Nano 开发 xff08 2 xff09 Jupyter Lab配置 前言安装JupyterLab设置密码生成Jupyter lab配置文件设置配置文件远程开启JupyterLab后记 前言 本篇继续jetson na
  • 串口通信协议 UART+I2C+SPI

    UART 异步 串行 全双工 I2C SPI 不同通信协议比较 UART UART协议详解 UART通信 xff0c 接收与发送 xff08 详细版 xff0c 附代码 xff09 UART串行通信详解 待整理 UART是Universal
  • STM32—UART中断收发 Day4

    软件 xff1a STM32CubeMX xff0c MDK ARM 硬件 xff1a 蓝桥杯物联网Lora开发板 xff0c 板载芯片STM32L071 一 STM32CubeMX配置 1 先在连接 xff08 Connectivity
  • jeston nano安装Ubuntu镜像时启动遇到问题

    A start job is running for End user configuration after initial OEM installation 开始我跑了一下午 43 一晚上 xff0c 都没成功 xff0c 第二天 xf
  • Jetson TX2零基础学习(二)——安装pip3、pytorch、torchvision

    目录 一 安装pip3 二 安装pytorch 三 安装torchvision 系列文章 大家好 xff0c 很开心又见面了 xff0c 这次接着上篇博客 xff0c 为大家详细介绍在Jetson TX2中搭环境的方法 一 安装pip3 首
  • 一起学nRF51xx 6 - uart

    前言 通用异步接收器 发送器提供快速 全双工 内置流量控制的异步串行通信 CTS RTS 在硬件方面支持高达1Mbps波特率 支持奇偶校验和第9位数据生成 用于每个UART接口线的GPIO可从芯片上的GPIO中任选 而且可独立配置 这使得芯
  • mega328p-ADC,PWM,UART驱动

    ADC驱动 函 数 名 Ai Init 函数功能 Ai端口初始化 输入参数 void 输出参数 void 返 回 值 void 参考文档 void 创 件 人 程强刚 创建日期 2016 02 09 修改历史 void Ai Init vo
  • 使用HAL库开发STM32:UART基础使用

    文章目录 目的 基础说明与初始化 基础说明 初始化 数据接收和发送 轮询方式 中断方式 DMA方式 其它说明 总结 目的 UART 异步串口 是单片机非常常用的一个功能 一般用作设备或模块间通讯的一种方式 通常所说的232或是485通讯从写
  • UART ISR Tx Rx 架构

    我让事情变得复杂了吗 我正在构建我的代码 以便通过 UART 从 8051 micro 与外围设备进行通信 外设响应主机的命令 一次只能响应一个命令 这是一个简单的发送和接收协议 tx1 rx1 tx2 rx2 tx3 rx3 每个 TX
  • Android Things:连接到串行调试控制台

    我一直在尝试连接到串行控制台树莓派 3 with 安卓事物 using USB to TTL cable从我的Linux Ubuntu 机器 尽管我按照文档连接了电缆 但执行时我得到的只是minicom命令如下 with 没有机会输入任何字
  • IOError:[Errno 2]没有这样的文件或目录(当它确实存在时)Python [重复]

    这个问题在这里已经有答案了 我正在通过 python 中的 uart 传输文件文件夹 下面您可以看到简单的功能 但有一个问题 因为我收到如标题所示的错误 IOError Errno 2 No such file or directory 1
  • STM32F4-Discovery (STM32F429ZIT6) 上的 RS232 (UART) 与 HAL 库?

    背景 这是我的一些背景 以便你们知道我有或没有哪些相关知识 我完全是这种嵌入式系统的新手 而且我对电子产品一无所知 我是一个纯粹的软件人员 我唯一的嵌入式系统经验是Raspberry Pi 它与STM32F4 Discovery有很大不同
  • GATT 配置文件和 UART 服务

    我是开发通过蓝牙连接到外围设备的移动应用程序的新手 我搜索到 GATT 是用于蓝牙LE 通信的相关配置文件 但我们的客户建议我们使用 UART 服务 现在我很困惑 1 这两件事是如何关联的 2 我们是否必须选择其中之一 如果是的话 每一个的
  • Python - 保存在 GNU Nano 2.2.4 中编辑的文件[关闭]

    很难说出这里问的是什么 这个问题是含糊的 模糊的 不完整的 过于宽泛的或修辞性的 无法以目前的形式得到合理的回答 如需帮助澄清此问题以便重新打开 访问帮助中心 help reopen questions 我对编程 使用 Raspberry

随机推荐