当前位置:网站首页>1. Mx6ul core module serial USB interface test (VI)

1. Mx6ul core module serial USB interface test (VI)

2022-07-26 02:09:00 szembed

The following is already in Iot-6ULX/EVB-6ULX The verification on the platform passed ,Iot-6ULX/EVB-6ULX Introduce the following :

5. USB The interface test  

The development board is equipped with 1 road USB Host and 1 road USB OTG, among USB OTG Used as a program burning port on the development board , Not for the time being . The following test content is for USB Host Test of .

USB Host Interface to use U Disk for testing , The test results are based on the U Different disks , There will be differences .

5.1 USB Host Write speed test

At present, the system does not support automatic attachment of external devices , So before the test , You need to U The disk is attached to the system . After the system starts , Insert FAT32 Format U Disk to the development board USB Host, The system can recognize U Disk equipment sda:

 

                                                                System identification U Disk information  

mount sda Of sda1 Partition :

[email protected] ~# mount -t vfat /dev/sda1 /mnt/    // take sda1 Partition mount to mnt Catalog

[email protected] ~# df                                // Check disk usage , View mounted devices   

                                                                        mount U disc  

As you can see from the diagram ,sda1 It has been successfully mounted to mnt Under the table of contents , Can be in mnt Under the catalogue, right U Disk for read-write test . Enter into mnt Catalog :

[email protected] ~# cd /mnt                    // Enter mnt Catalog

[email protected] mnt# pwd                     // View the current directory

                                                                          Get into mnt Catalog

Use dd Command to root Write data to directory , And generate largefile file , File size is 80 MiB, Test write speed .

[email protected] mnt#

dd if=/dev/zero of=./largefile bs=8k count=10240 conv=fdatasync

                                                                USB Interface write speed test  

From the information displayed on the terminal , The size of the file written is 80MiB, Speed is 7.8MB/s.

5.2 USB Host Read speed test

explain : because Linux Kernel mechanism of , Generally, there is no need to release the used cache. these cache Content can increase the reading and writing speed of files .

The test process is to be able to test from U The exact speed of reading data in the disk , So you need to clear the cache first .

Execute the following instructions , Clear cache :

[email protected] mnt# sh -c "sync && echo 3 > /proc/sys/vm/drop_caches"       // Clear page cache , Catalog entries and inode

                                                                  Clear cache  

Again using dd The instruction reads with dd Instructions written largefile file , Test the reading speed :

[email protected] ~# dd if=./largefile of=/dev/null bs=8k

                                                             USB Interface read speed test

From the information displayed on the terminal , The read file size is 80MiB, Speed is 26.2MB/s.

After the test is completed , Delete the test file with instructions :

[email protected] ~# ls -alh largefile              // see largefile file

[email protected] ~# rm largefile                 // remove largefile file

                                                                    Delete test file  

After the test is completed , Need to put U Disk unload :

[email protected] mnt# cd                    // Enter the user home directory

[email protected] ~# umount /mnt            // uninstall mnt Mounted in the directory U disc

[email protected] ~# df                       // Check disk usage , View mounted devices

                                                                        uninstall U disc  

You can see from the information displayed on the terminal ,sda1 Successfully uninstalled .

 

原网站

版权声明
本文为[szembed]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/207/202207260158386872.html