[嵌入式linux] IMX6-EK200 Linux 测试手册

[复制链接]
13|0
 楼主 | 2018-11-7 17:32 | 显示全部楼层 |阅读模式
MY-IMX6-EK200 Linux-4.1.15 测试手册


目录[size=12.502px] [隐藏]

  • 1
    测试环境
  • 2
    网口测试
    • 2.1
      ETH0
    • 2.2
      ETH1 测试

  • 3
    USB 测试
  • 4
    SD卡测试
  • 5
    标准 GPIO 测试
  • 6
    GPIO-LED 测试
    • 6.1
      led-heartbeat
    • 6.2
      led-timer
    • 6.3
      led-default
    • 6.4
      led-gpio

  • 7
    GPIO-KEY 测试
  • 8
    串口测试
    • 8.1
      UART2
    • 8.2
      UART3
    • 8.3
      UART4
    • 8.4
      UART5

  • 9
    CAN 测试
  • 10
    SPI测试
    • 10.1
      ECSPI1 测试
    • 10.2
      ECSPI2 测试

  • 11
    Watchdog 测试
    • 11.1
      超时复位测试
    • 11.2
      喂狗测试

  • 12
    RTC 测试
  • 13
    定时唤醒测试
  • 14
    音频测试
    • 14.1
      播放音频
    • 14.2
      音频录音

  • 15
    显示屏(选配)测试
  • 16
    显示屏配置测试
    • 16.1
      LVDS1 单屏显示
    • 16.2
      LVDS0 单屏显示
    • 16.3
      HDMI 单屏显示
    • 16.4
      RGB(LCD) 单屏显示
    • 16.5
      LVDS1 + LVDS0 双屏同步显示
    • 16.6
      LVDS1 + LVDS0 双屏同步显示
    • 16.7
      LVDS1(主) + HDMI 双屏异步显示
    • 16.8
      LVDS1(主) + RGB 双屏异步显示
    • 16.9
      LVDS0(主) + HDMI 双屏异步显示
    • 16.10
      LVDS0(主) + RGB 双屏异步显示
    • 16.11
      HDMI(主) + LVDS1 双屏异步显示
    • 16.12
      HDMI(主) + LVDS0 双屏异步显示
    • 16.13
      视频播放测试

  • 17
    4G模块EC20(选配)测试
  • 18
    4路视频采集模块(选配)测试


测试环境
  • 开发板型号: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 进行测试
[size=0.875em]# ping 192.168.137.99 -c 2 -w 4

  
[size=0.875em]PING 192.168.137.99 (192.168.137.99) 56(84) bytes of data.

[size=0.875em]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
[size=0.875em]2 packets transmitted, 2 received, 0% packet loss, time 999ms

--- 192.168.137.99 ping statistics ---
[size=0.875em]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 进行测试
[size=0.875em][size=0.875em]# ping 192.168.137.99 -c 2 -w 4  

[size=0.875em]  
[size=0.875em][size=0.875em]PING 192.168.137.99 (192.168.137.99) 56(84) bytes of data.

[size=0.875em]64 bytes from 192.168.137.99: icmp_seq=1 ttl=128 time=1.54 ms


[size=0.875em]64 bytes from 192.168.137.99: icmp_seq=2 ttl=128 time=4.03 ms--- 192.168.137.99 ping statistics ---
rtt min/avg/max/mdev = 1.546/2.792/4.039/1.247 ms

2 packets transmitted, 2 received, 0% packet loss, time 1001ms

USB 测试
  • 插入U盘
[size=0.875em]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
[size=0.875em]scsi 1:0:0:0: Direct-Access     TOSHIBA  TransMemory      1.00 PQ: 0 ANSI: 4

scsi host1: usb-storage 1-1.2:1.0
[size=0.875em]sd 1:0:0:0: [sda] Write Protect is off

sd 1:0:0:0: [sda] 15148608 512-byte logical blocks: (7.75 GB/7.22 GiB)
[size=0.875em]sd 1:0:0:0: [sda] Attached SCSI removable disk

sd 1:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[size=0.875em] sda: sda4

  • 拔出U盘
usb 1-1.2: USB disconnect, device number 5SD卡测试
  • 插入SD卡
[size=0.875em]mmcblk2: mmc2:1234 SA02G 1.83 GiB

[size=0.875em] mmcblk2:

  • 弹出SD卡
mmc2: card 1234 removed标准 GPIO 测试
[size=0.875em]
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

[size=0.875em]# OUT_IO_NUMBER=85

[size=0.875em]# echo ${OUT_IO_NUMBER} > /sys/class/gpio/export

[size=0.875em]# echo out > /sys/class/gpio/gpio${OUT_IO_NUMBER}/direction

# echo 0 > /sys/class/gpio/gpio${OUT_IO_NUMBER}/value
[size=0.875em]# echo 1 > /sys/class/gpio/gpio${OUT_IO_NUMBER}/value

GPIO-LED 测试led-heartbeat
[size=0.875em]说明:led-heartbeat 连接到 D8,系统启动后可以看到 D8 在有规律的闪烁。
led-timer
[size=0.875em]说明: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 准备测试
[size=0.875em]# evtest

[size=0.875em]No device specified, trying to scan all of /dev/input/event*

Available devices:/dev/input/event0:  WM8962 Beep Generator
[size=0.875em]Select the device event number [0-1]:

[size=0.875em]/dev/input/event1:  gpio-keys

  • 选择 gpio-keys 所对应的序号
[size=0.875em]Select the device event number [0-1]: 1

Input driver version is 1.0.1
[size=0.875em]Input device ID: bus 0x19 vendor 0x1 product 0x1 version 0x100

Input device name: "gpio-keys"Supported events:  Event type 0 (EV_SYN)
[size=0.875em]    Event code 116 (KEY_POWER)

  Event type 1 (EV_KEY)    Event code 114 (KEY_VOLUMEDOWN)    Event code 115 (KEY_VOLUMEUP)
[size=0.875em]Testing ... (interrupt to exit)

[size=0.875em]Properties:

  • 按动开发板上的按键
[size=0.875em]Event: time 1537921332.815219, type 1 (EV_KEY), code 114 (KEY_VOLUMEDOWN), value 1

Event: time 1537921332.815219, -------------- SYN_REPORT ------------
[size=0.875em]Event: time 1537921332.985211, -------------- SYN_REPORT ------------

Event: time 1537921332.985211, type 1 (EV_KEY), code 114 (KEY_VOLUMEDOWN), value 0
[size=0.875em]Event: time 1537921335.535203, type 1 (EV_KEY), code 115 (KEY_VOLUMEUP), value 0

Event: time 1537921335.355204, type 1 (EV_KEY), code 115 (KEY_VOLUMEUP), value 1Event: time 1537921335.355204, -------------- SYN_REPORT ------------
[size=0.875em]Event: time 1537921337.375207, -------------- SYN_REPORT ------------

Event: time 1537921335.535203, -------------- SYN_REPORT ------------Event: time 1537921337.375207, type 1 (EV_KEY), code 116 (KEY_POWER), value 1
[size=0.875em]Event: time 1537921337.535204, -------------- SYN_REPORT ------------

[size=0.875em]Event: time 1537921337.535204, type 1 (EV_KEY), code 116 (KEY_POWER), value 0

串口测试UART2
  • 位置:J1:7,9
  • 设备:/dev/ttymxc1
  • 测试指令
[size=0.875em]# /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   
[size=0.875em]read char is z   

read char is w   read char is w   read char is .   read char is m   read char is y   
[size=0.875em]read char is .   

read char is r   read char is .   read char is c   read char is o   read char is m   read char is c   
[size=0.875em]Read Test Data finished,Read Test Data is-------www.myzr.com.cn  

[size=0.875em]read char is n   

UART3
  • 位置:J1:11,13
  • 设备:/dev/ttymxc2
  • 测试指令
[size=0.875em]# /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   
[size=0.875em]read char is z   

read char is w   read char is w   read char is .   read char is m   read char is y   
[size=0.875em]read char is .   

read char is r   read char is .   read char is c   read char is o   read char is m   read char is c   
[size=0.875em]Read Test Data finished,Read Test Data is-------www.myzr.com.cn  

[size=0.875em]read char is n   

UART4
  • 位置:J1:15,17
  • 设备:/dev/ttymxc3
  • 测试指令
[size=0.875em]# /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   
[size=0.875em]read char is z   

read char is w   read char is w   read char is .   read char is m   read char is y   
[size=0.875em]read char is .   

read char is r   read char is .   read char is c   read char is o   read char is m   read char is c   
[size=0.875em]Read Test Data finished,Read Test Data is-------www.myzr.com.cn  

[size=0.875em]read char is n   

UART5
  • 位置:J1:16,18
  • 设备:/dev/ttymxc4
  • 测试指令
[size=0.875em]# /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   
[size=0.875em]read char is z   

read char is w   read char is w   read char is .   read char is m   read char is y   
[size=0.875em]read char is .   

read char is r   read char is .   read char is c   read char is o   read char is m   read char is c   
[size=0.875em]Read Test Data finished,Read Test Data is-------www.myzr.com.cn  

[size=0.875em]read char is n   

CAN 测试
  • [size=0.875em]测试准备

    [size=0.875em]将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#1122334455667788SPI测试ECSPI1 测试
  • 位置:J7:7,9
  • 测试设备:/dev/spidev0.1
  • 测试指令
[size=0.875em]# /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)   
[size=0.875em]FF FF FF FF FF FF   

FF FF FF FF FF FF   40 00 00 00 00 95   FF FF FF FF FF FF   FF FF FF FF FF FF   
[size=0.875em]F0 0D   

[size=0.875em]DE AD BE EF BA AD   

ECSPI2 测试
  • 位置:J7: 8,10
  • 测试设备:/dev/spidev1.0
  • 测试指令
[size=0.875em]# /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)   
[size=0.875em]FF FF FF FF FF FF   

FF FF FF FF FF FF   40 00 00 00 00 95   FF FF FF FF FF FF   FF FF FF FF FF FF   
[size=0.875em]F0 0D  

[size=0.875em]DE AD BE EF BA AD   

Watchdog 测试超时复位测试
[size=0.875em]# /unit_tests/wdt_driver_test.out 10 15 1  

  
[size=0.875em]Starting wdt_driver (timeout: 10, sleep: 15, test: write)

Trying to set timeout value=10 seconds
[size=0.875em]Now reading back -- The timeout is 10 seconds

The actual timeout was set to 10 seconds
[size=0.875em]CPU:   Freescale i.MX6Q rev1.5 996 MHz (running at 792 MHz)

U-Boot 2016.03-svn270 (Oct 09 2018 - 14:44:15 +0800)
[size=0.875em]Board: MYZR i.MX6 Evaluation Kit

CPU:   Extended Commercial temperature grade (-20C to 105C) at 45C
[size=0.875em]Reset cause: WDOG

喂狗测试
[size=0.875em]# /unit_tests/wdt_driver_test.out 4 2 1 &  

  [1] 748
[size=0.875em]Starting wdt_driver (timeout: 4, sleep: 2, test: write)

Trying to set timeout value=4 seconds
[size=0.875em]Now reading back -- The timeout is 4 seconds

[size=0.875em]The actual timeout was set to 4 seconds

RTC 测试
  • 查看当前系统时钟
[size=0.875em]# date  

  
[size=0.875em]Wed Sep 26 00:27:45 UTC 2018

  • 查看当前RTC芯片时钟
[size=0.875em]# hwclock   

  
[size=0.875em]Wed Sep 26 00:28:01 2018  0.000000 seconds

  • 设置系统时钟,并同步到RTC芯片
[size=0.875em]# date -s "2018-09-21 12:34:56"  

  
[size=0.875em]Fri Sep 21 12:34:56 UTC 2018  

  • 将系统时钟写入硬件时钟
# hwclock -w  
  • 断电重启评估板
  • 查看当前系统时钟
[size=0.875em]# date  

  
[size=0.875em]Fri Sep 21 12:36:11 UTC 2018  

  • 查看当前RTC芯片时钟
[size=0.875em]# hwclock  

  
[size=0.875em]Fri Sep 21 12:36:16 2018  0.000000 seconds  

定时唤醒测试
  • 设定 10 秒后产生唤醒事件
# echo +10 > /sys/class/rtc/rtc1/wakealarm
  • 使设备进入
# echo mem > /sys/power/state
  • 睡眠信息
[size=0.875em]PM: Syncing filesystems ... done.

[size=0.875em]Freezing user space processes ... (elapsed 0.001 seconds) done.

[size=0.875em]Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.

Suspending console(s) (use no_console_suspend to debug)
[size=0.875em]PM: suspend devices took 0.060 seconds

PM: suspend of devices complete after 59.213 msecsPM: late suspend of devices complete after 1.004 msecs
[size=0.875em]CPU2: shutdown

PM: noirq suspend of devices complete after 1.031 msecsDisabling non-boot CPUs ...CPU1: shutdownCPU3: shutdownEnabling non-boot CPUs ...CPU1 is up
[size=0.875em]PM: resume of devices complete after 116.878 msecs

CPU2 is upCPU3 is upPM: noirq resume of devices complete after 1.138 msecsPM: early resume of devices complete after 1.136 msecs
[size=0.875em]Restarting tasks ... done.

[size=0.875em]PM: resume devices took 0.120 seconds

  • 唤醒信息
[size=0.875em](elapsed 0.012 seconds) done.

[size=0.875em]PM: suspend of devices complete after 693.963 msecs

PM: suspend devices took 0.700 seconds
[size=0.875em]PM: late suspend of devices complete after 2.419 msecs

PM: noirq suspend of devices complete after 2.303 msecsDisabling non-boot CPUs ...
[size=0.875em]PM: early resume of devices complete after 1.476 msecs

PM: noirq resume of devices complete after 1.402 msecsPM: resume of devices complete after 121.763 msecs
[size=0.875em]Restarting tasks ... done.

[size=0.875em]PM: resume devices took 0.130 seconds

音频测试播放音频
[size=0.875em]# aplay /unit_tests/audio8k16S.wav   

  
[size=0.875em]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  


扫描二维码,随时随地手机跟帖
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复

您需要登录后才可以回帖
登录 | 注册
高级模式
我要创建版块 申请成为版主

论坛热帖

关闭

热门推荐上一条 /5 下一条

快速回复 返回顶部 返回列表