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

2 Nand Flash读写测试
测试Nand Flash/eMMC的读写速度,主要用到dd指令。指令说明:
dd用于复制,用指定大小的块拷贝一个文件。从if(input file)文件读出,写到of(output file)指定的文件,bs是每次写块的大小,count是读写块的数量。"if=/dev/zero"不产生IO,即可以不断输出数据,因此可以用来测试纯写速度。
2.1 Nand Flash写速度测试
Nand Flash根文件系统下包含了多个目录,我们需要选择其中的某个目录进行测试。可以执行以下指令查看根目录下包含的目录。
[email protected] ~# cd / //进入根目录
[email protected] /# pwd //查看当前所在目录
[email protected] /# ls //显示当前目录下的文件和目录

根目录下的内容
从上图中可以看到,根目录下包含了多个子目录。其中,root目录就是系统登陆时的默认所在目录(主目录)。在测试过程中,我们进入到root目录下进行测试。
[email protected] /# cd /root //进到root目录
[email protected] ~# pwd //查看当前所在目录

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

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

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

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

删除测试文件
边栏推荐
- Leetcode algorithm 147. insert and sort the linked list
- 【深入浅出玩转FPGA学习11----Testbench书写技巧2】
- 【深入浅出玩转FPGA学习11----Testbench书写技巧1】
- 还在用==0 null equal 判断空值吗,对isEmpty 和 isBlank有多少了解呢
- SQL手工盲注、报错注入
- 【独立站建设】shopify卖家:学会这几点,网上商店销量翻倍!
- Worthington nuclease and Micrococcus related research and determination scheme
- D. Permutation restoration (greedy + double pointer)
- Zhinai buys melons (DP backpack)
- Implementation of recommendation system collaborative filtering in spark
猜你喜欢

【2019】【论文笔记】基于超材料可调谐THz宽频吸收——

Advantages of composition API

DialogRPT-Dialog Ranking Pretrained Transformers

Cross Site Request Forgery (CSRF): impact, examples, and Prevention

2022 love analysis ― bank digitalization practice report

Why does the debugger display the wrong function

pdf. JS introduction

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

SQL manual blind injection and error reporting injection

How to display numbers / English time in Excel
随机推荐
pdf. JS introduction
Common shell operations in Phoenix
【2020】【论文笔记】磁控溅射法生长Bi2Te3/CoFeB双层异质结——
E2. escape the maze (hard version)
阿里云Redis开发规范
大佬们, flinksql datahub源表,源表有字段 timestamp 16位, 写入Ora
AttributeError: ‘Document‘ object has no attribute ‘pageCount‘
MySQL locking table problem
2022 love analysis ― bank digitalization practice report
【深入浅出玩转FPGA学习11----Testbench书写技巧2】
达梦数据库表导入导出按钮灰色,导入不了dmp文件
Add an interceptor to resttemplate to record the request response, and you also need to solve the problem that the flow is read only once
HTC手机官解、S-ON/S-OFF与超级CID的关系
How to install opengauss manually (non om mode)
The slow loading of the first entry page of vite local operation
Basic usage of set, map, DOM classlist in ES6
MySQL transaction isolation level
How to display numbers / English time in Excel
Summary after reading "poor dad and rich dad"
一种MCU事件型驱动C框架