Tegra Nano上手

手记

公司直接预定了tegra nano,昨天晚上拿到货了,跃跃欲试,一查文档,5V,2A,还是micro usb接口,直接用手机的充电器连上,结果点亮打印几行输出,就挂了。。。
各种查原因,各种找电源试,最后确定了解决方案。首先说一下nano的电源模式:

Power Management for Jetson Nano Devices

The NVIDIA® Jetson Nano™ system-on-a-chip (SOC) and NVIDIA® Tegra® Board Support Package (BSP) provide many features related to power management, thermal management, and electrical management. These features deliver the best user experience possible given the constraints of a particular platform. The target user experience ensures the perception that the device provides:
• Uniformly high performance
• Excellent battery life
• Perfect stability
• Comfortable and cool to the touch

Supported Modes and Power Efficiency

Jetson Nano is designed with a high-efficiency Power Management Integrated Circuit (PMIC), voltage regulators, and power tree to optimize power efficiency. It supports two power modes, such as 5W and MaxN(10W). Each mode allows several configurations with various CPU frequencies and numbers of cores online.
You restrict the module to a predefined configuration by capping the memory, CPU, and GPU frequencies and number of cores online at pre-qualified values.
The following table shows the power modes predefined by NVIDIA and the associated caps on use of the module’s resources.

Mode Name MaxN 5W
Power Budget 10W 5W
Mode ID 0 1
Online CPU 4 2
CPU Maximal Frequency (MHz) 1479 918
GPU TPC 1 1
GPU Maximal Frequency (MHz) 921.6 640
Memory Maximal Frequency (MHz) 1600 1600

The default mode is 10W (ID 0).
To change the power mode
• Run the following command:

sudo /usr/sbin/nvpmodel -m <x>

Where is the power mode ID, e.g. 0 or 1.
Once you set a power mode, the module stays in that mode until you change it. The mode persists across power cycles and SC7.
To display the current power mode
• Enter the command:

sudo /usr/sbin/nvpmodel -q

To learn about other options
• Enter the command:

/usr/sbin/nvpmodel -h

To define a custom mode
• To define your own custom mode, add a mode definition to the file:
/l4t/release/rfs/etc/nvpmodel/nvpmodel_t210_jetson-nano.conf
This is an example entry for mode 1:

< POWER_MODEL ID=1 NAME=5W >
CPU_ONLINE CORE_0 1
CPU_ONLINE CORE_1 1
CPU_ONLINE CORE_2 0
CPU_ONLINE CORE_3 0
CPU_A57 MIN_FREQ  0
CPU_A57 MAX_FREQ 918000
GPU_POWER_CONTROL_ENABLE GPU_PWR_CNTL_EN on
GPU MIN_FREQ 0
GPU MAX_FREQ 640000000
GPU_POWER_CONTROL_DISABLE GPU_PWR_CNTL_DIS auto
EMC MAX_FREQ 1600000000

The CPU’s unit of frequency is kilohertz (KHz). The GPU’s and EMMC’s unit is Hertz (Hz). You must assign each custom mode a unique ID in the ID field.
Test your custom mode to determine:
• How many active cores to use
• The frequencies to set for the GPU, EMC, and each CPU cluster
The frequencies you set are subject to the MaxN limit defined in mode 0.
看了上面,我们发现nano目前官方就支持2个模式,一个10w,一个5w的。默认开启的是10w的,这就是祸首,由于micro USB的供电是有协议的,所以我们用手机充电头直插usb根本无法启动nano的,这里使用nvidia提供的第二个电源接口,5V的DC头,先按下图将红圈进行短接,切换供电模式至Power Jack即咱们的DC头。再用手机USB转DC接入Nano,开机,一切正常。
Tegra Nano上手

开发展望

目前nano使用的是ubuntu18.04 arrch64 操作系统,所以我们的开发完全按照TX2进行,就是内存小很多,开机可用只有2G多一点可用了,所以后面部署产品,第一步得干掉GUI界面,太占内存了。只不过需要注意的是nano的CUDA是10 ,cudnn是7.3.1 ,tensorrt是5.0.6.21.
各位使用Caffe的同学们,注意CUDA是10,Caffe大概率是编译不过的。
推荐的开发文档:
Jetson_Nano_Developer_Kit_User_Guide.pdf
开发手册