当前位置:网站首页>I.MX6UL核心模块使用连载-USB接口测试 (六)
I.MX6UL核心模块使用连载-USB接口测试 (六)
2022-07-26 01:58:00 【szembed】
以下内容已经在Iot-6ULX/EVB-6ULX平台上验证通过,Iot-6ULX/EVB-6ULX介绍如下:

5. USB接口测试
开发板上搭载了1路USB Host和1路USB OTG,其中USB OTG在开发板上作为程序烧录口使用,暂不测试。以下测试内容是针对USB Host的测试。
USB Host接口使用U盘进行测试,测试结果根据使用的U盘的不同,会有所差异。
5.1 USB Host写速度测试
目前系统暂不支持自动挂载外接设备,所以测试之前,需要先将U盘挂载到系统。系统启动之后,插入FAT32格式的U盘到开发板上的USB Host,系统能识别到U盘设备sda:

系统识别U盘信息
挂载sda的sda1分区:
[email protected] ~# mount -t vfat /dev/sda1 /mnt/ //将sda1分区挂载到mnt目录
[email protected] ~# df //查看磁盘占用情况,查看挂载设备

挂载U盘
从图中可以看到,sda1已经成功挂载到了mnt目录下,可以在mnt目录下对U盘进行读写测试了。进入到mnt目录:
[email protected] ~# cd /mnt //进到mnt目录
[email protected] mnt# pwd //查看当前所在目录

进入mnt目录
使用dd指令往root目录下写入数据,并生成largefile文件,文件大小为80 MiB,测试写速度。
[email protected] mnt#
dd if=/dev/zero of=./largefile bs=8k count=10240 conv=fdatasync

USB接口写速度测试
从终端显示的信息中,写入的文件大小为80MiB,速度为7.8MB/s。
5.2 USB Host读速度测试
说明:因为Linux的内核机制,一般情况下不需要特意去释放已经使用的cache。这些cache内容可以增加文件的读写速度。
测试过程是为了能够测试出从U盘中读取数据的准确速度,所以需要先清除缓存。
执行以下指令,清除缓存:
[email protected] mnt# sh -c "sync && echo 3 > /proc/sys/vm/drop_caches" //清除页面缓存,目录项和inode

清除缓存
再次使用dd指令读取前面用dd指令写入的largefile文件,测试读速度:
[email protected] ~# dd if=./largefile of=/dev/null bs=8k

USB接口读速度测试
从终端显示的信息中,读取的文件大小为80MiB,速度为26.2MB/s。
测试完成后,用指令删除掉测试文件:
[email protected] ~# ls -alh largefile //查看largefile文件
[email protected] ~# rm largefile //移除largefile文件

删除测试文件
测试完成后,需要将U盘卸载:
[email protected] mnt# cd //进入用户主目录
[email protected] ~# umount /mnt //卸载mnt目录下的挂载的U盘
[email protected] ~# df //查看磁盘占用情况,查看挂载设备

卸载U盘
从终端显示的信息中可以看到,sda1已经成功卸载。
边栏推荐
- SQLyog数据导入导出图文教程
- Worthington产气荚膜梭菌神经氨酸酶的特征及测定
- Relationship between HTC mobile official solution, s-on/s-off and super CID
- Guys, the flinksql datahub source table has a field timestamp 16 bits, which is written to ora
- Characteristics and determination of neuraminidase from Clostridium perfringens in Worthington
- [independent station construction] Shopify seller: learn these points and double the sales volume of online stores!
- Navica工具把远程MySQL导入到本地MySQL数据库
- TI AM335x工控模块网络跟文件系统NFS的实现
- JS add random pixel noise background to the page
- Worthington papain - production of glycopeptides from purified proteoglycans (attached Literature)
猜你喜欢

CD from grabbing the track to building a streaming media server -- a case study of "moon in the hometown of sleep"

Ti AM335X工控模块使用beaglebone(bbb)的Debian系统

怎么使用宝塔面板把node全栈项目部署到服务器上

Protect syslog servers and devices

I.MX6UL核心模块使用连载-RS485测试 (十)

Why does the debugger display the wrong function

Implementation of C iterator
![Niuke - bm39 serialized binary tree [hard]](/img/c4/f14fe8488bbf28689fa3f02cdf4dae.png)
Niuke - bm39 serialized binary tree [hard]

Qt程序美化之样式表的使用方法,Qt使用图片作为背景与控件透明化,Qt自定义按钮样式

IDEA如何快速删除最近打开的项目
随机推荐
Worthington核酸酶、微球菌相关研究及测定方案
推荐系统-协同过滤在Spark中的实现
Leetcode/ numbers that appear only once
[Verilog digital system design (Xia Yuwen) 3 ----- basic concepts of Verilog syntax 1]
Arm assembly foundation of SOC
AUTOCAD——计算面积的方法
What is the difference between for... In... And for... Of
Ti AM335X工控模块使用beaglebone(bbb)的Debian系统
重发布基础与配置
TI AM335x工控模块网络跟文件系统NFS的实现
dataframe 修改某行某列位置的值
【深入浅出玩转FPGA学习11----Testbench书写技巧1】
Worthington木瓜蛋白酶丨从纯化的蛋白聚糖生产糖肽(附文献)
MPLS知识点
C# 迭代器的实现
Remember a laravel problem script @php artist package:discover handling the post autoload dump event returned with
AttributeError: ‘Document‘ object has no attribute ‘pageCount‘
Dest0g3 520 orientation (under update)
【2021】【论文笔记】6G技术愿景——OTFS调制技术
Phoenix中常用shell操作
