LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

source code for testing usb memory sticks

Hello, Are there any CVI source code examples for testing one or more USB memory sticks? Thanks!

0 Kudos
Message 1 of 6
(3,949 Views)

Hi RandalOrmond,

 

How do you define testing USB memory sticks? 

 

Thanks!

Chris T.
0 Kudos
Message 2 of 6
(3,910 Views)

Hello,

I need to create a test that will allow me to test one to many USB memory sticks for correct identification, report back size of memory, and perform a basic read/write and compare memory test. The memory sticks would be like the standard type bought from office depot , best buy,,, etc... 8GB, 16GB, 32GB that people use to transfer files from one PC to another. The test solution may include a switch matrix that allows one USB port in a PC to be switched to the memory sticks under test... Test time should be very short <5 seconds.

Thanks!

 

Randal

0 Kudos
Message 3 of 6
(3,903 Views)

The test time is a little bit short.  You can't get more than about 30 MB/s over a USB2 connection. So doing a read/write and compare memory test  within 5s is unrealistic. And even if you assume USB3 with optimistic 600 MB/s  5s are not enough for a 4GB stick.

0 Kudos
Message 4 of 6
(3,869 Views)

Memory testing can take forever - in the old days when we were trying to use American made DRAM we did a lot of memory testing - if you do checkerboard, walking ones, walking zeroes, ping pong, etc. you will get increasing probability of fault detection but it takes a long time.

 

Another issue with USB flash memory devices is that they by design vary the physical location used for storing data - so that if you were to re-write a file on the flash drive, you might wind up writing to a different physical location each time.  They do this to extend the life of the device so that any one flash cell location doesn't get overused.  This could also have the effect of hiding faults or making it more difficult to find them.  It might be that bypassing the file system (if you can) helps but then again it might not, depending on how they implemented the flash wear-out mitigation.

 

 

0 Kudos
Message 5 of 6
(3,843 Views)

Hello, My goal is to not perform a full memory test, rather a test that demonstrates at a high level the device can be recognized , read back the memory size and perform a few write, read, erase cycles. Back to the original question: Are there any C code examples available that I can review and then expand upon to create a test. Thanks for your help and interest!

0 Kudos
Message 6 of 6
(3,828 Views)