|
【接上一章節(jié)MY-IMX6-EK200 Linux-4.1.15測試手冊v2.0(2)】
2.13 串口測試(UART4)
【測試說明】:采用串口自發(fā)自收的方式進行測試
【接口標(biāo)識】:UART2/3/4/5_TTL
【系統(tǒng)設(shè)備】:/dev/ttymxc3
測試操作
短接串口4的發(fā)送發(fā)接收管腳(J1的15和17號管腳)
執(zhí)行測試指令:
=====> 輸入指令:
/my-demo/gcc-linaro-5.3-arm/serial_test.out /dev/ttymxc3 "www.myzr.com.cn"
=====> 輸出信息:
Starting send data...finish
Starting receive data:
ASCII: 0x77 Character: w
ASCII: 0x77 Character: w
ASCII: 0x77 Character: w
ASCII: 0x2e Character: .
ASCII: 0x6d Character: m
ASCII: 0x79 Character: y
ASCII: 0x7a Character: z
ASCII: 0x72 Character: r
ASCII: 0x2e Character: .
ASCII: 0x63 Character: c
ASCII: 0x6f Character: o
ASCII: 0x6d Character: m
ASCII: 0x2e Character: .
ASCII: 0x63 Character: c
ASCII: 0x6e Character: n
ASCII: 0x0 Character:
測試結(jié)果
執(zhí)行測試指令后,應(yīng)用輸出如上類似信息即正常。
2.14 串口測試(UART5)
【測試說明】:采用串口自發(fā)自收的方式進行測試
【接口標(biāo)識】:UART2/3/4/5_TTL
【系統(tǒng)設(shè)備】:/dev/ttymxc4
測試操作
短接串口5的發(fā)送發(fā)接收管腳(J1的16和18號管腳)
執(zhí)行測試指令:
=====> 輸入指令:
/my-demo/gcc-linaro-5.3-arm/serial_test.out /dev/ttymxc4 "www.myzr.com.cn"
=====> 輸出信息:
Starting send data...finish
Starting receive data:
ASCII: 0x77 Character: w
ASCII: 0x77 Character: w
ASCII: 0x77 Character: w
ASCII: 0x2e Character: .
ASCII: 0x6d Character: m
ASCII: 0x79 Character: y
ASCII: 0x7a Character: z
ASCII: 0x72 Character: r
ASCII: 0x2e Character: .
ASCII: 0x63 Character: c
ASCII: 0x6f Character: o
ASCII: 0x6d Character: m
ASCII: 0x2e Character: .
ASCII: 0x63 Character: c
ASCII: 0x6e Character: n
ASCII: 0x0 Character:
測試結(jié)果
執(zhí)行測試指令后,應(yīng)用輸出如上類似信息即正常。
2.15 CAN 測試
【測試說明】:采用CAN1發(fā)送,CAN0接收的方式。
【接口標(biāo)識】:CAN1,CAN2
【系統(tǒng)接口】:can0,can1
測試準(zhǔn)備
將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)發(fā)送數(shù)據(jù):
=====> 輸入指令:
cansend can1 1F334455#1122334455667788
=====> 輸出信息:
can0 1F334455 [8] 11 22 33 44 55 66 77 88
測試結(jié)果
CAN2(can1)發(fā)送數(shù)據(jù)后,CAN1(can0)會把接收到的數(shù)據(jù)輸出,如:11 22 33 44 55 66 77 88
2.16 SPI測試(ECSPI1)
【測試說明】:采用自發(fā)自收的方式測試。
【接口標(biāo)識】:SPI1/2
【系統(tǒng)設(shè)備】:/dev/spidev0.1
測試操作
短接J7的7和9管腳。
執(zhí)行測試指令
=====> 輸入指令:
/my-demo/gcc-linaro-5.3-arm/spidev_test.out -D /dev/spidev0.1
=====> 輸出信息:
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
測試結(jié)果
執(zhí)行測試指令后,應(yīng)用輸出如上類似信息即正常。
2.17 SPI測試(ECSPI2)
【測試說明】:采用自發(fā)自收的方式測試。
【接口標(biāo)識】:SPI1/2
【系統(tǒng)設(shè)備】:/dev/spidev1.0
測試操作
短接J7的8和10管腳。
執(zhí)行測試指令
=====> 輸入指令:
/my-demo/gcc-linaro-5.3-arm/spidev_test.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
測試結(jié)果
執(zhí)行測試指令后,應(yīng)用輸出如上類似信息即正常。
2.18 Watchdog 超時復(fù)位測試
【測試說明】:開啟看門狗,并等待看門狗超時,產(chǎn)生復(fù)位。
【接口標(biāo)識】:無
【系統(tǒng)設(shè)備】:/dev/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
測試結(jié)果
運行測試命令10秒后,WatchDog超時,系統(tǒng)被復(fù)位。會在終端看到系統(tǒng)重新啟動輸出的信息類似如下:
U-Boot 2016.03-svn351 (Jan 25 2019 - 10:13:51 +0800)
CPU: Freescale i.MX6Q rev1.5 996 MHz (running at 792 MHz)
CPU: Extended Commercial temperature grade (-20C to 105C) at 48C
Reset cause: WDOG
Board: MYZR i.MX6 Evaluation Kit
Model: MY-IMX6-EK200-6Q-1G
2.19 Watchdog 喂狗測試
【測試說明】:開啟看門狗,并使應(yīng)用程序喂狗。
【接口標(biāo)識】:無
【系統(tǒng)設(shè)備】:/dev/watchdog
測試操作
運行看門狗程序,并設(shè)置超時時間為4秒,喂狗間隔時間為2秒:
=====> 輸入指令:
/unit_tests/wdt_driver_test.out 4 2 1 &
=====> 輸出信息:
[1] 1026
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
【下章節(jié)為MY-IMX6-EK200 Linux-4.1.15測試手冊v2.0(4)】
|
|