adamgreen / SDCard

SDFileSystem for LPC17xx
1 stars 1 forks source link

==How to Clone This project uses submodules (ie. GCC4MBED and CppUTest). Cloning therefore requires an extra flag to get all of the necessary code.

{{{ git clone --recursive git@github.com:adamgreen/SDCard.git }}}

==Overview This version of the SD card driver was heavily influenced by these previous versions:

===Features

==SoakTest The code in the [[https://github.com/adamgreen/SDCard/tree/master/SoakTest | SoakTest/ folder]] uses an updated SDFileSystem driver to create a file on the root of a SD card and then reads from it at random locations. It continues to perform these random reads, validating the read data as it progresses, until the user sends a key press to stop the test. It can be run for an extended period of time to verify read robustness of the card/driver. It will log about errors that it encounters during the read process. It also dumps some of the core properties of the SD card and a few internal SDFileSystem counters that help me determine how well it is working on different devices.

===Important Notes!

I would really appreciate it if people could run this test on their SmoothieBoards with various uSD cards that they have and report back their results! The [[https://github.com/adamgreen/SDCard/tree/master/bins | bins/ folder]] contains a pre-built [[https://github.com/adamgreen/SDCard/blob/master/bins/SoakTest-Smoothie1.bin?raw=true | SoakTest-Smoothie1.bin binary]] that it is ready to be installed on a SmoothieBoard via its boot loader. It is probably enough to just let it run for a few minutes on the bulk of your cards to see if it gets any failures. It would be great if you could let it run for an extended period of time (ie. overnight) on what you consider to be your most reliable card.

If you encounter failures:

I have already hit an issue with a ADATA 8GB uSD card that I have here. The failure is documented in [[https://github.com/adamgreen/SDCard/issues/8 | this GitHub issue]].

Thanks for your help! I really appreciate it!

Example output when run on a SanDisk Mobile Ultra 16GB MicroSD HC I card: {{{ SDCard Soak Test Cleanup from previous test run.

How large should the test file be in MB (100MB is default): Dumping SD CID register contents. CID = 0x03 0x53 0x44 0x53 0x55 0x31 0x36 0x47 0x80 0x13 0x51 0xB0 0xF7 0x00 0xBB 0x6D Manufacturer ID: 0x03 OEM ID: SD Product Name: SU16G Product Revision: 8.0 Product Serial Number: 0x1351B0F7 Manufacturing Date: November 2011 Checksum: 0x36 Dumping SD OCR register contents. OCR = 0xC0FF8000 Card Power Up Status: 1 Card Capacity Status: 1 UHS-II Card Status: 0 Switching to 1.8V Accepted: 0 2.7 - 2.8V: 1 2.8 - 2.9V: 1 2.9 - 3.0V: 1 3.0 - 3.1V: 1 3.1 - 3.2V: 1 3.2 - 3.3V: 1 3.3 - 3.4V: 1 3.4 - 3.5V: 1 3.5 - 3.6V: 1 Dumping SD CSD register contents. CSD = 0x40 0x0E 0x00 0x32 0x5B 0x59 0x00 0x00 0x76 0xB2 0x7F 0x80 0x0A 0x40 0x40 0x13 CSD Version: 2.0 Data Read Access-Time: 0x0E (1ms) Data Read Access-Time in CLK cycles: 0 Max Transfer Rate: 25.0MHz Card Command Class 0: yes Card Command Class 1: no Card Command Class 2: yes Card Command Class 3: no Card Command Class 4: yes Card Command Class 5: yes Card Command Class 6: no Card Command Class 7: yes Card Command Class 8: yes Card Command Class 9: no Card Command Class 10: yes Card Command Class 11: no Max Read Data Block Length: 512 Partial Blocks for Read Allowed: no Write Block Misalignment: no Read Block Misalignment: no DSR Implemented: no Device Size: 15931539456 bytes Erase Single Block Enable: 512 bytes Erase Sector Size (SECTOR_SIZE): 128 Write Protect Group Size: 0 Write Protect Group Enable: no Write Speed Factor: 4 Max Write Data Block Length: 512 Partial Blocks for Write Allowed: no File Format Group: 0 Copy Flag: copy Permanent Write Protection: 0 Temporary Write Protection: 0 File Format: 0 CRC: 0x09 Creating 10 MB test file... The following soak test will run until you press a key to stop it. LED1 will blink while the test is progressing smoothly. Starting soak test now... Removing test file. SD Card Driver Counters maximumWaitWhileBusyTime = 23 maximumWaitForR1ResponseLoopCount = 2 maximumACMD41LoopTime = 13 cmd12PaddingByteRequiredCount = 13011 Test Completed! }}}