【接上一章节明远智睿MY-IMX6-EK200 Linux-4.1.15测试手册v2.0(1)】
2.10 GPIO-KEY测试 【测试说明】:使用 evtest 进行测试
【接口标识】:KEY3, KEY2, KEY1
【系统接口】:/dev/input/eventX
测试操作
运行 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 所对应的序号 =====> 输入指令: 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 ------------ 测试结果
当发生按键时,evtest 会输出相应的信息。
2.11 串口测试(UART2) 【测试说明】:采用串口自发自收的方式进行测试
【接口标识】:UART2/3/4/5_TTL
【系统设备】:/dev/ttymxc1
测试操作
短接串口2的发送发接收管脚(J1的7和9号管脚)
执行测试指令: =====> 输入指令: /my-demo/gcc-linaro-5.3-arm/serial_test.out /dev/ttymxc1 "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: 测试结果
执行测试指令后,应用输出如上类似信息即正常。
2.12 串口测试(UART3) 【测试说明】:采用串口自发自收的方式进行测试
【接口标识】:UART2/3/4/5_TTL
【系统设备】:/dev/ttymxc2
测试操作
短接串口3的发送发接收管脚(J1的11和13号管脚)
执行测试指令: =====> 输入指令: /my-demo/gcc-linaro-5.3-arm/serial_test.out /dev/ttymxc2 "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: 测试结果
执行测试指令后,应用输出如上类似信息即正常。
2.13 串口测试(UART4) 【测试说明】:采用串口自发自收的方式进行测试
【接口标识】:UART2/3/4/5_TTL
【系统设备】:/dev/ttymxc3
测试操作
短接串口4的发送发接收管脚(J1的15和17号管脚)
执行测试指令: =====> 输入指令: /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: 测试结果
执行测试指令后,应用输出如上类似信息即正常。
2.14 串口测试(UART5) 【测试说明】:采用串口自发自收的方式进行测试
【接口标识】:UART2/3/4/5_TTL
【系统设备】:/dev/ttymxc4
测试操作
短接串口5的发送发接收管脚(J1的16和18号管脚)
执行测试指令: =====> 输入指令: /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: 测试结果
执行测试指令后,应用输出如上类似信息即正常。
2.15 CAN 测试 【测试说明】:采用CAN1发送,CAN0接收的方式。
【接口标识】:CAN1,CAN2
【系统接口】:can0,can1
测试准备
将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
=====> 输出信息: can0 1F334455 [8] 11 22 33 44 55 66 77 88 测试结果
CAN2(can1)发送数据后,CAN1(can0)会把接收到的数据输出,如:11 22 33 44 55 66 77 88
【下章节为明远智睿MY-IMX6-EK200 Linux-4.1.15测试手册v2.0(3)】
|