MY-IMX6-EK200 Linux-4.1.15 测试手册

来自明远智睿的wiki
跳转至: 导航搜索


测试环境

  • 开发板型号:MYIMX6EK200-6Q-2G-16G
  • 内核版本:Linux-4.1.15
  • 文件系统:L4115-fsl-image-qt5-myimx6a9.tar.bz2


网口测试

ETH0
  • 关闭 ETH1
# ifconfig eth1 down
  • 配置 ETH0
# ifconfig eth0 192.168.137.81  
  • 使用 ping 进行测试
# ping 192.168.137.99 -c 2 -w 4
  
PING 192.168.137.99 (192.168.137.99) 56(84) bytes of data.
64 bytes from 192.168.137.99: icmp_seq=1 ttl=128 time=0.811 ms
64 bytes from 192.168.137.99: icmp_seq=2 ttl=128 time=0.324 ms

--- 192.168.137.99 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.324/0.567/0.811/0.244 ms
ETH1 测试
  • 关闭 ETH0
# ifconfig eth0 down  
  • 配置 ETH0
# ifconfig eth1 192.168.137.82  
  • 使用 ping 进行测试
# ping 192.168.137.99 -c 2 -w 4  
  
PING 192.168.137.99 (192.168.137.99) 56(84) bytes of data.
64 bytes from 192.168.137.99: icmp_seq=1 ttl=128 time=1.54 ms
64 bytes from 192.168.137.99: icmp_seq=2 ttl=128 time=4.03 ms

--- 192.168.137.99 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 1.546/2.792/4.039/1.247 ms

USB 测试

  • 插入U盘
usb 1-1.2: new high-speed USB device number 5 using ci_hdrc
usb-storage 1-1.2:1.0: USB Mass Storage device detected
scsi host1: usb-storage 1-1.2:1.0
scsi 1:0:0:0: Direct-Access     TOSHIBA  TransMemory      1.00 PQ: 0 ANSI: 4
sd 1:0:0:0: [sda] 15148608 512-byte logical blocks: (7.75 GB/7.22 GiB)
sd 1:0:0:0: [sda] Write Protect is off
sd 1:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
 sda: sda4
sd 1:0:0:0: [sda] Attached SCSI removable disk
  • 拔出U盘
usb 1-1.2: USB disconnect, device number 5

SD卡测试

  • 插入SD卡
mmcblk2: mmc2:1234 SA02G 1.83 GiB 
 mmcblk2:
  • 弹出SD卡
mmc2: card 1234 removed

标准 GPIO 测试

EIM_A25__GPIO5_IO02 J7:4
EIM_D23__GPIO3_IO23 J1:12
EIM_D28__GPIO3_IO28 J1:8
EIM_D29__GPIO3_IO29 J1:10
EIM_D30__GPIO3_IO30 J21:12
SD1_CLK__GPIO1_IO20 J4:8
SD1_DAT0__GPIO1_IO16 J14:18
SD2_CMD__GPIO1_IO11 J4:13
SD2_CLK__GPIO1_IO10 J4:7
SD2_DAT0__GPIO1_IO15 J4:3
SD2_DAT1__GPIO1_IO14 J4:5
SD2_DAT2__GPIO1_IO13 J4:9
SD2_DAT3__GPIO1_IO12 J4:11
SD3_DAT5__GPIO7_IO00 J21:11
GPIO_19__GPIO4_IO05 J7:3

# OUT_IO_NUMBER=85
# echo ${OUT_IO_NUMBER} > /sys/class/gpio/export
# echo out > /sys/class/gpio/gpio${OUT_IO_NUMBER}/direction
# echo 0 > /sys/class/gpio/gpio${OUT_IO_NUMBER}/value
# echo 1 > /sys/class/gpio/gpio${OUT_IO_NUMBER}/value

GPIO-LED 测试

led-heartbeat

说明:led-heartbeat 连接到 D8,系统启动后可以看到 D8 在有规律的闪烁。

led-timer

说明:led-timer 连接到 D9,系统启动后可以看到 D9 在有规律的闪烁。

  • 更改 led-timer (D9) 灭的时间
# echo 1000 > /sys/class/leds/led-timer/delay_off  
  • 更改 led-timer (D9) 亮的时间
# echo 2000 > /sys/class/leds/led-timer/delay_on  
led-default
  • 使 led-default (D7) 灭
echo 0 > /sys/class/leds/default/brightness  
  • 使 led-default (D7) 常亮
echo 1 > /sys/class/leds/default/brightness  
led-gpio
  • 使 led-gpio (D10) 灭
echo 0 > /sys/class/leds/gpio/brightness  
  • 使 led-gpio (D10) 常亮
echo 1 > /sys/class/leds/gpio/brightness  

GPIO-KEY 测试

  • 运行 evtest 准备测试
# evtest 

No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0:  WM8962 Beep Generator
/dev/input/event1:  gpio-keys
Select the device event number [0-1]:
  • 选择 gpio-keys 所对应的序号
Select the device event number [0-1]: 1

Input driver version is 1.0.1
Input device ID: bus 0x19 vendor 0x1 product 0x1 version 0x100
Input device name: "gpio-keys"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 114 (KEY_VOLUMEDOWN)
    Event code 115 (KEY_VOLUMEUP)
    Event code 116 (KEY_POWER)
Properties:
Testing ... (interrupt to exit)
  • 按动开发板上的按键
Event: time 1537921332.815219, type 1 (EV_KEY), code 114 (KEY_VOLUMEDOWN), value 1
Event: time 1537921332.815219, -------------- SYN_REPORT ------------
Event: time 1537921332.985211, type 1 (EV_KEY), code 114 (KEY_VOLUMEDOWN), value 0
Event: time 1537921332.985211, -------------- SYN_REPORT ------------
Event: time 1537921335.355204, type 1 (EV_KEY), code 115 (KEY_VOLUMEUP), value 1
Event: time 1537921335.355204, -------------- SYN_REPORT ------------
Event: time 1537921335.535203, type 1 (EV_KEY), code 115 (KEY_VOLUMEUP), value 0
Event: time 1537921335.535203, -------------- SYN_REPORT ------------
Event: time 1537921337.375207, type 1 (EV_KEY), code 116 (KEY_POWER), value 1
Event: time 1537921337.375207, -------------- SYN_REPORT ------------
Event: time 1537921337.535204, type 1 (EV_KEY), code 116 (KEY_POWER), value 0
Event: time 1537921337.535204, -------------- SYN_REPORT ------------

串口测试

UART2
  • 位置:J1:7,9
  • 设备:/dev/ttymxc1
  • 测试指令
# /my-demo/linux-4.1.15/MY_SERIAL_TEST_L4115_MYIMX6A9.out /dev/ttymxc1 "www.myzr.com.cn"  
  
Welcome to TTYtest  
  
Send test data------www.myzr.com.cn  
read char is w   
read char is w   
read char is w   
read char is .   
read char is m   
read char is y   
read char is z   
read char is r   
read char is .   
read char is c   
read char is o   
read char is m   
read char is .   
read char is c   
read char is n   
Read Test Data finished,Read Test Data is-------www.myzr.com.cn  
UART3
  • 位置:J1:11,13
  • 设备:/dev/ttymxc2
  • 测试指令
# /my-demo/linux-4.1.15/MY_SERIAL_TEST_L4115_MYIMX6A9.out /dev/ttymxc2"www.myzr.com.cn"  
  
Welcome to TTYtest  
  
Send test data------www.myzr.com.cn  
read char is w   
read char is w   
read char is w   
read char is .   
read char is m   
read char is y   
read char is z   
read char is r   
read char is .   
read char is c   
read char is o   
read char is m   
read char is .   
read char is c   
read char is n   
Read Test Data finished,Read Test Data is-------www.myzr.com.cn  
UART4
  • 位置:J1:15,17
  • 设备:/dev/ttymxc3
  • 测试指令
# /my-demo/linux-4.1.15/MY_SERIAL_TEST_L4115_MYIMX6A9.out /dev/ttymxc3 "www.myzr.com.cn"  
  
Welcome to TTYtest  
  
Send test data------www.myzr.com.cn  
read char is w   
read char is w   
read char is w   
read char is .   
read char is m   
read char is y   
read char is z   
read char is r   
read char is .   
read char is c   
read char is o   
read char is m   
read char is .   
read char is c   
read char is n   
Read Test Data finished,Read Test Data is-------www.myzr.com.cn  
UART5
  • 位置:J1:16,18
  • 设备:/dev/ttymxc4
  • 测试指令
# /my-demo/linux-4.1.15/MY_SERIAL_TEST_L4115_MYIMX6A9.out /dev/ttymxc4 "www.myzr.com.cn"  
  
Welcome to TTYtest  
  
Send test data------www.myzr.com.cn  
read char is w   
read char is w   
read char is w   
read char is .   
read char is m   
read char is y   
read char is z   
read char is r   
read char is .   
read char is c   
read char is o   
read char is m   
read char is .   
read char is c   
read char is n   
Read Test Data finished,Read Test Data is-------www.myzr.com.cn  

CAN 测试

  • 测试准备
    将CAN1的CAN_L与CAN2的CAN_L连接;将CAN1的CAN_H与CAN2的CAN_H连接。
  • 配置 CAN1 (can0)
# ip link set can0 up type can bitrate 125000
  • 配置 CAN2 (can1)
# ip link set can1 up type can bitrate 125000
  • CAN1 (can0) 后台接收
# candump can0 &
  • CAN2 (can1) 发送数据
# cansend can1 1F334455#1122334455667788

SPI测试

ECSPI1 测试
  • 位置:J7:7,9
  • 测试设备:/dev/spidev0.1
  • 测试指令
# /my-demo/linux-4.1.15/MY_SPIDEV_TEST_L4115_MYIMX6A9.out -D /dev/spidev0.0   
  
spi mode: 0  
bits per word: 8  
max speed: 500000 Hz (500 KHz)  
  
FF FF FF FF FF FF   
40 00 00 00 00 95   
FF FF FF FF FF FF   
FF FF FF FF FF FF   
FF FF FF FF FF FF   
DE AD BE EF BA AD   
F0 0D   
ECSPI2 测试
  • 位置:J7: 8,10
  • 测试设备:/dev/spidev1.0
  • 测试指令
# /my-demo/linux-4.1.15/MY_SPIDEV_TEST_L4115_MYIMX6A9.out -D /dev/spidev1.0   
  
spi mode: 0  
bits per word: 8  
max speed: 500000 Hz (500 KHz)  
  
FF FF FF FF FF FF   
40 00 00 00 00 95   
FF FF FF FF FF FF   
FF FF FF FF FF FF   
FF FF FF FF FF FF   
DE AD BE EF BA AD   
F0 0D  

Watchdog 测试

超时复位测试
# /unit_tests/wdt_driver_test.out 10 15 1  
  
Starting wdt_driver (timeout: 10, sleep: 15, test: write)
Trying to set timeout value=10 seconds
The actual timeout was set to 10 seconds
Now reading back -- The timeout is 10 seconds


U-Boot 2016.03-svn270 (Oct 09 2018 - 14:44:15 +0800)

CPU:   Freescale i.MX6Q rev1.5 996 MHz (running at 792 MHz)
CPU:   Extended Commercial temperature grade (-20C to 105C) at 45C
Reset cause: WDOG
Board: MYZR i.MX6 Evaluation Kit
喂狗测试
# /unit_tests/wdt_driver_test.out 4 2 1 &  
  
[1] 748
Starting wdt_driver (timeout: 4, sleep: 2, test: write)
Trying to set timeout value=4 seconds
The actual timeout was set to 4 seconds
Now reading back -- The timeout is 4 seconds

RTC 测试

  • 查看当前系统时钟
# date  
  
Wed Sep 26 00:27:45 UTC 2018
  • 查看当前RTC芯片时钟
# hwclock   
  
Wed Sep 26 00:28:01 2018  0.000000 seconds 
  • 设置系统时钟,并同步到RTC芯片
# date -s "2018-09-21 12:34:56"  
  
Fri Sep 21 12:34:56 UTC 2018  
  • 将系统时钟写入硬件时钟
# hwclock -w  
  • 断电重启评估板
  • 查看当前系统时钟
# date  
  
Fri Sep 21 12:36:11 UTC 2018  
  • 查看当前RTC芯片时钟
# hwclock  
  
Fri Sep 21 12:36:16 2018  0.000000 seconds  

定时唤醒测试

  • 设定 10 秒后产生唤醒事件
# echo +10 > /sys/class/rtc/rtc1/wakealarm 
  • 使设备进入
# echo mem > /sys/power/state
  • 睡眠信息
PM: Syncing filesystems ... done.
Freezing user space processes ... (elapsed 0.001 seconds) done.
Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
Suspending console(s) (use no_console_suspend to debug)
PM: suspend of devices complete after 59.213 msecs
PM: suspend devices took 0.060 seconds
PM: late suspend of devices complete after 1.004 msecs
PM: noirq suspend of devices complete after 1.031 msecs
Disabling non-boot CPUs ...
CPU1: shutdown
CPU2: shutdown
CPU3: shutdown
Enabling non-boot CPUs ...
CPU1 is up
CPU2 is up
CPU3 is up
PM: noirq resume of devices complete after 1.138 msecs
PM: early resume of devices complete after 1.136 msecs
PM: resume of devices complete after 116.878 msecs
PM: resume devices took 0.120 seconds
Restarting tasks ... done.
  • 唤醒信息
(elapsed 0.012 seconds) done.
PM: suspend of devices complete after 693.963 msecs
PM: suspend devices took 0.700 seconds
PM: late suspend of devices complete after 2.419 msecs
PM: noirq suspend of devices complete after 2.303 msecs
Disabling non-boot CPUs ...
PM: noirq resume of devices complete after 1.402 msecs
PM: early resume of devices complete after 1.476 msecs
PM: resume of devices complete after 121.763 msecs
PM: resume devices took 0.130 seconds
Restarting tasks ... done.

音频测试

播放音频
# aplay /unit_tests/audio8k16S.wav   
  
Playing WAVE '/unit_tests/audio8k16S.wav' : Signed 16 bit Little Endian, Rate 8000 Hz, Stereo
音频录音
  • 录音
# arecord -d 5 -f S16_LE -t wav foobar.wav  
  • 播放录音
# aplay foobar.wav  

显示屏(选配)测试

  • 特别说明:
     当U-Boot 版本u-boot-2016.03 svn315及以上    
         内核 版本  linux-3.0.35  svn31及以上
                  linux-3.14.52 svn369及以上
                  linux-3.14.52 svn368及以上
         烧录工具   MfgTool-MYIMX6A9-L* svn181及以上   

请参考《MY-IMX6-A9系列:显示功能测试》进行测试

  • 一般情况下则按照如下方法测试

在系统启动过程中,可以看到 Linux 小企鹅和 OpenEmbedded 启动画面。

显示屏配置测试

说明:每项显示功能测试都需要重启系统进入到u-boot命令行,输入命令并按确认键。

U-Boot 2016.03-svn270 (Oct 09 2018 - 14:44:15 +0800)

CPU:   Freescale i.MX6Q rev1.5 996 MHz (running at 792 MHz)
CPU:   Extended Commercial temperature grade (-20C to 105C) at 43C
Reset cause: POR
Board: MYZR i.MX6 Evaluation Kit
Model: MY-IMX6-EK200-6Q-2G
I2C:   ready
DRAM:  2 GiB
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
SF: Detected SST25VF016B with page size 256 Bytes, erase size 64 KiB, total 2 MiB
*** Warning - bad CRC, using default environment

No panel detected: default to MY-LVDS-WSVGA
Display: MY-LVDS-WSVGA (1024x600)
In:    serial
Out:   serial
Err:   serial
Net:   FEC [PRIME]
Normal Boot
Hit any key to stop autoboot:  0 
=> 
LVDS1 单屏显示
=> setenv display ${disp_fb0_lvds1}
=> saveenv; boot
LVDS0 单屏显示
=> setenv display ${disp_fb0_lvds0}
=> saveenv; boot
HDMI 单屏显示
=> setenv display ${disp_fb0_hdmi}
=> saveenv; boot
RGB(LCD) 单屏显示
=> setenv display ${disp_fb0_lcd}
=> saveenv; boot
LVDS1 + LVDS0 双屏同步显示
=> setenv display ${disp_lvds_sync}
=> saveenv; boot
LVDS1 + LVDS0 双屏同步显示
=> setenv display ${disp_lvds_sync}
=> saveenv; boot
LVDS1(主) + HDMI 双屏异步显示
=> setenv display ${disp_fb0_lvds1} ${disp_fb1_hdmi}
=> saveenv; boot
LVDS1(主) + RGB 双屏异步显示
=> setenv display ${disp_fb0_lvds1} ${disp_fb1_lcd}
=> saveenv; boot
LVDS0(主) + HDMI 双屏异步显示
=> setenv display ${disp_fb0_lvds0} ${disp_fb1_hdmi}
=> saveenv; boot
LVDS0(主) + RGB 双屏异步显示
=> setenv display ${disp_fb0_lvds0} ${disp_fb1_lcd}
=> saveenv; boot
HDMI(主) + LVDS1 双屏异步显示
=> setenv display ${disp_fb0_hdmi} ${disp_fb0_lvds1}
=> saveenv; boot
HDMI(主) + LVDS0 双屏异步显示
=> setenv display ${disp_fb0_hdmi} ${disp_fb0_lvds0}
=> saveenv; boot
视频播放测试
  • 设置Linux的环境变量
# export GSTL=gst-launch-1.0
# export PLAYBIN=playbin
# export GPLAY=gplay-1.0
# export GSTINSPECT=gst-inspect-1.0
# export MP4_FILE="/unit_tests/akiyo.mp4"
  • 播放视频到主显示屏
# $GSTL $PLAYBIN uri=file://$MP4_FILE video-sink="imxv4l2sink device=/dev/video17"
  • 播放视频到第二显示屏
# $GSTL $PLAYBIN uri=file://$MP4_FILE video-sink="imxv4l2sink device=/dev/video18"

4G模块EC20(选配)测试

# /my-demo/linux-4.1.15/MY_EC20_QuectelCM_L4115_MYIMX6A9.out &

[1] 636
[10-01_14:02:10:616] WCDMA&LTE_QConnectManager_Linux&Android_V1.1.34
[10-01_14:02:10:617] /my-demo/linux-4.1.15/MY_EC20_QuectelCM_L4115_MYIMX6A7.out profile[1] = (null)/(null)/(null)/0, pincode = (null)
[10-01_14:02:10:619] Find /sys/bus/usb/devices/1-1.2 idVendor=2c7c idProduct=0125
[10-01_14:02:10:620] Find /sys/bus/usb/devices/1-1.2:1.4/net/eth2
[10-01_14:02:10:620] Find usbnet_adapter = eth2
[10-01_14:02:10:620] Find /sys/bus/usb/devices/1-1.2:1.4/GobiQMI/qcqmi2
[10-01_14:02:10:620] Find qmichannel = /dev/qcqmi2
[10-01_14:02:10:665] Get clientWDS = 7
[10-01_14:02:10:697] Get clientDMS = 8
[10-01_14:02:10:729] Get clientNAS = 9
[10-01_14:02:10:760] Get clientUIM = 10
[10-01_14:02:10:792] Get clientWDA = 11
[10-01_14:02:10:825] requestBaseBandVersion EC20CEFAR02A10M4G
[10-01_14:02:10:920] requestGetSIMStatus SIMStatus: SIM_READY
[10-01_14:02:10:953] requestGetProfile[1] cmnet///0
[10-01_14:02:10:985] requestRegistrationState2 MCC: 460, MNC: 0, PS: Attached, DataCap: LTE
[10-01_14:02:11:017] requestQueryDataCall IPv4ConnectionStatus: DISCONNECTED
[10-01_14:02:11:081] requestRegistrationState2 MCC: 460, MNC: 0, PS: Attached, DataCap: LTE
[10-01_14:02:11:144] requestSetupDataCall WdsConnectionIPv4Handle: 0x87779840
[10-01_14:02:11:241] requestQueryDataCall IPv4ConnectionStatus: CONNECTED
[10-01_14:02:11:274] ifconfig eth2 up
[10-01_14:02:11:305] busybox udhcpc -f -n -q -t 5 -i eth2
[10-01_14:02:11:321] udhcpc (v1.24.1) started
[10-01_14:02:11:433] Sending discover...
[10-01_14:02:11:493] Sending select for 10.127.206.63...
[10-01_14:02:11:552] Lease of 10.127.206.63 obtained, lease time 7200
[10-01_14:02:11:637] /etc/udhcpc.d/50default: Adding DNS 211.136.17.107
[10-01_14:02:11:638] /etc/udhcpc.d/50default: Adding DNS 211.136.20.203

4路视频采集模块(选配)测试

# EXEC_FILE=/my-demo/linux-4.1.15/MY_TW6865_DEMO_L4115_MYIMX6A9.out
# ${EXEC_FILE} -x 2 -ot 0 -ol 0 -ow 512 -oh 300 -m 2 &
# ${EXEC_FILE} -x 3 -ot 0 -ol 512 -ow 512 -oh 300 -m 2 &
# ${EXEC_FILE} -x 4 -ot 300 -ol 0 -ow 512 -oh 300 -m 2 &
# ${EXEC_FILE} -x 5 -ot 300 -ol 512 -ow 512 -oh 300 -m 2 &

--------------------------------------------------------------------------------  
* Looking forward to communicating with you for more functions and field applications.  
* 珠海明远智睿科技有限公司    
* ZhuHai MYZR Technology CO.,LTD.  
* Latest Update: 2018/10/08    
--------------------------------------------------------------------------------