1、内存读写测试
执行如下命令:memtester 16m 2,测试内存能否正常运行,如图:
文件系统自带内存读写测试工具,测试数据大小为1MB。执行如下命令进行测试:runLmDDRBandwidth.sh
如图:
但是,点击触摸屏上ARM->DDR Bandwidth->RUN,没有反应,我点击屏幕上其他图标也基本没反应,也不知道是屏的问题还是驱动的问题。
2、显示屏亮度调节
查看亮度级数,例程给的命令有错误,路径不对,例程提供路径与实际路径如图:
实际操作结果如图:
在对应目录下,输入命令:cat max_brightness
可以看到返回10,说明背光支持10级变化
输入命令: cat actual_brightness,查看当前亮度
输入命令: echo 9 > brightness ,修改数字改变屏幕亮度,可以看到执行后,屏幕明显亮了很多
3、运行Matrix用户界面程序
开发板已经设置上电自动执行此程序,先终止,执行以下命令:
/etc/init.d/matrix-gui-2.0 stop
可以看到显示屏已经停止用户界面程序,如图:
串口终端返回:
- Stopping Matrix GUI applicationUnable to query physical screen size, defaulting to 100 dpi.
- To override, set QT_QPA_EGLFS_PHYSICAL_WIDTH and QT_QPA_EGLFS_PHYSICAL_HEIGHT (in millimeters).
- .
复制代码
运行Matrix Qt用户界面程序,执行命令:/etc/init.d/matrix-gui-2.0 start
可以看到显示屏界面又跟开机时一样了
以上命令仅仅是暂时停止Matrix 用户界面程序的运行,系统重新启动后依然会自动运行。若希望上电不要自动运行Matrix 用户界面程序,可以执行以下命令:mv /etc/rc5.d/S97matrix-gui-2.0 /etc/rc5.d/K97matrix-gui-2.0
相当于修改了运行脚本的名字,就不会上电自动运行了
4、LCD触摸屏校准
先关闭程序,执行命令:/etc/init.d/matrix-gui-2.0 stop
触摸屏校准,执行如下命令:ts_calibrate,LCD会弹出校准界面,请依次点击校准准星。连续点击五次之后,会在/etc目录下生成触摸屏校准文件pointercal,可以看到,终端显示信息如下:
- xres = 480, yres = 272
- Took 28 samples...
- Top left : X = 520 Y = 3179
- Took 19 samples...
- Top right : X = 3596 Y = 3124
- Took 7 samples...
- Bot right : X = 3629 Y = 1078
- Took 19 samples...
- Bot left : X = 557 Y = 1069
- Took 16 samples...
- Center : X = 2089 Y = 2098
- -21.335449 0.123631 0.002088
- 311.880493 -0.000621 -0.082760
- Calibration constants: -1398240 8102 136 20439400 -40 -5423 65536
复制代码
查看 pointercal,输入命令:cat pointercal,返回:
- 4918 -671 1710654 519 -1738 12846395 65536 480 272
复制代码
再重新启动系统界面这时再点击触摸屏上ARM->DDR Bandwidth->RUN,可以了,灵敏度高了很多,如图:
5、USB2.0 OTG接口HOST功能测试
硬件图如下:
配套的转接线也送了,么么哒,如图:
USB HOST功能测试:需要将U盘(FAT 3 2格式)通过Micro USB转接头插到TL437x-EasyEVM开发板USB OTG1接口,串口终端打印信息如下:
- [ 621.331695] u*** 1-1: new high-speed USB device number 2 using xhci-hcd
- [ 621.543460] u*** 1-1: New USB device found, idVendor=0951, idProduct=1665
- [ 621.550231] u*** 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
- [ 621.557476] u*** 1-1: Product: DataTraveler 2.0
- [ 621.561986] u*** 1-1: Manufacturer: Kingston
- [ 621.566205] u*** 1-1: SerialNumber: 50E54951377F1010A9450D78
- [ 621.580964] u***-storage 1-1:1.0: USB Mass Storage device detected
- [ 621.602550] scsi0 : u***-storage 1-1:1.0
- [ 622.603856] scsi 0:0:0:0: Direct-Access Kingston DataTraveler 2.0 0000 PQ: 0 ANSI: 4
- [ 622.621978] sd 0:0:0:0: Attached scsi generic sg0 type 0
- [ 622.647105] sd 0:0:0:0: [sda] 30273600 512-byte logical blocks: (15.5 GB/14.4 GiB)
- [ 622.663301] sd 0:0:0:0: [sda] Write Protect is off
- [ 622.670024] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
- [ 622.692371] sda: sda1
- [ 622.709344] sd 0:0:0:0: [sda] Attached SCSI removable disk
复制代码
可以看到,U盘大小为16G的,挂载在 sda1下,若是查到USB OTG0接口,没有打印信息,但是从原理图上看两个接口好像没区别。
查询挂载路径,执行如下命令:df -h,如图:
USB HOST接口传输速度测试,写速度测试,执行如下命令:time dd if=/dev/zero of=/run/media/sda1/test bs=1024k count=200,注意路径哦,完全copy例程路径可能会出错,返回:
- 200+0 records in
- 200+0 records out
- real 0m 11.66s
- user 0m 0.03s
- sys 0m 2.80s
复制代码
速度还是挺快的,本例程一共写入200Mbyte 测试数据到U盘的text 文件。U盘写入速度=200÷
(11.66+2.80)=13.8MB/s。
跟例程的比较一下,如图:
U盘读速度测试,执行如下命令:time dd if=/run/media/sda1/test of=/dev/null bs=1024k
返回:
- 200+0 records in
- 200+0 records out
- real 0m 0.75s
- user 0m 0.01s
- sys 0m 0.74s
复制代码
U盘读取速度=200÷(0.7+0.74)=138.89MByte/s。
6、USB2.0 OTG接口DEVICE功能测试
查看/lib/modules/路径下有没有跟内核版本对应的文件,执行命令,如图:
- root@am437x-evm:~# ls /lib/modules/
- 3.14.43-g2cbce0c
- root@am437x-evm:~# uname -r
- 3.14.43-g2cbce0c
- root@am437x-evm:~#
复制代码
内核名字一致,如果内核名字不一致,请安装模块。
先使用Micro USB连接计算机和开发板OTG0;再将USB DEVICE启动脚本u***_device.sh拷贝到文件系统任意路径下,光盘路径:shellu***_device u***_device.sh,如图:
重新上电,打开串口终端,在u***_device.sh目录下,执行如下命令,如图:
- root@am437x-evm:/home# cd u***_device/
- root@am437x-evm:/home/u***_device# ls
- u***_device.sh
- root@am437x-evm:/home/u***_device# source u***_device.sh
- 100+0 records in
- 100+0 records out
- mke2fs 1.42.9 (28-Dec-2013)
- Discarding device blocks: done
- Filesystem label=
- OS type: Linux
- Block size=1024 (log=0)
- Fragment size=1024 (log=0)
- Stride=0 blocks, Stripe width=0 blocks
- 25688 inodes, 102400 blocks
- 5120 blocks (5.00%) reserved for the super user
- First data block=1
- Maximum filesystem blocks=67371008
- 13 block groups
- 8192 blocks per group, 8192 fragments per group
- 1976 inodes per group
- Superblock backups stored on blocks:
- 8193, 2457[ 130.350024] Number of LUNs=8
- 7, 40961, 57345, 73729
- Allocating group tables: [ 130.357749] Mass Storage Function, version: 2009/09/11
- done
- Writing inode tables: [ 130.368218] LUN: removable file: (no medium)
- done
- Writing sup[ 130.378077] Number of LUNs=1
- erblocks and filesystem accounting information: [ 130.386658] LUN: file: /mnt/ramdrive/vfat-file
- done
- [ 130.396493] Number of LUNs=1
- [ 130.400982] g_mass_storage gadget: Mass Storage Gadget, version: 2009/09/11
- [ 130.408012] g_mass_storage gadget: userspace failed to provide iSerialNumber
- [ 130.415106] g_mass_storage gadget: g_mass_storage ready
- [ 130.420492] dwc3 48390000.u***: otg: gadget gadget registered
- root@am437x-evm:/home/u***_device# [ 134.100798] g_mass_storage gadget: high-speed config #1: Linux File-Backed Storage
复制代码
查看:
- df
- Filesystem 1K-blocks Used Available Use% Mounted on
- udev 502132 4 502128 1% /dev
- tmpfs 102428 1432 100996 2% /run
- /dev/sda1 19478204 4873704 13592020 27% /
- none 4 0 4 0% /sys/fs/cgroup
- none 5120 0 5120 0% /run/lock
- none 512128 76 512052 1% /run/shm
- none 102400 32 102368 1% /run/user
- /dev/sdb 99150 1550 92480 2% /media/guyue/67e58164-2ab6-40d4-8e78-98bfae16f642
复制代码
0
|
|
|
|