Edit online

测试指南

测试环境:
  • 硬件:开发板
  • 软件:
    • PC 端的串口终端软件,用于 PC 和开发板进行串口通信
    • test_gpai 测试程序

test_gpai 测试

  1. 在 Luban-Lite 根目录下执行 scons --menuconfig,进入 menuconfig 的功能配置界面,按如下选择:

    Drivers options  --->
        Drivers examples  --->
            [*] Enable GPAI driver test command
    
  2. 在打开 gpai 的编译后,板子上可直接运行 gpai 命令:
    aic /> test_gpai -h
    Compile time: Jul 21202309:21:53
    Usage: test_gpai [options]:
         -c, --channel        Select one channel in[0, x], default is 0
         -t, --voltage        Modify default voltage
         -h, --help
    
    Example: test_gpai -c 4 -t 3

标准电压:通过 eFuse 获取的电压。不同产品系列的标准电压如下所示:

  • D21x: 3.0 V

  • D13x: 2.5 V

默认电压:无法通过 eFuse 获取电压时才使用的电压。

提示:

无法获取标准电压时,系统会返回信息提示: Failed to get standard voltage,此时需执行 -t, --voltage 命令配置默认电压。

ADC 读取测试

ADC 数据的读取,只需要普通的 cat 命令即可,每次 cat 可读取某一个通道中的当前数据。
aic /> test_gpai -c 4
GPAI ch4: 2432
GPAI ch4-voltage: 1.8043 #未获取到标准电压时,采用默认电压(即 "-t 所配置电压")进行计算
aic /> test_gpai -c 0
[W] hal_gpai_ch_is_valid()320 Ch0 is unavailable! # GPAI0 通道没有打开
aic /> test_gpai -c 4 -t 6
GPAI ch4: 2501
GPAI ch4-voltage: 1.8043
aic /> test_gpai -t 6
Please select a channel first #设置标准电压前,需通过-c 选择通道