adamgreen / SDCard

SDFileSystem for LPC17xx
1 stars 1 forks source link

Failed test - at least it says it both failed and passed #2

Closed wolfmanjm closed 8 years ago

wolfmanjm commented 8 years ago

Cleanup from previous test run. Dumping SD CID register contents. CID = 0x02 0x54 0x4D 0x53 0x44 0x30 0x31 0x47 0x32 0x9B 0x92 0x9F 0xB7 0x00 0x83 0x9D Manufacturer ID: 0x02 OEM ID: TM Product Name: SD01G Product Revision: 3.2 Product Serial Number: 0x9B929FB7 Manufacturing Date: March 2008 Checksum: 0x4E Dumping SD OCR register contents. OCR = 0x80FF8000 Card Power Up Status: 1 Card Capacity Status: 0 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 = 0x00 0x5D 0x00 0x32 0x5B 0x59 0x83 0xB2 0xFF 0xFF 0xFF 0x80 0x16 0x40 0x00 0x81 CSD Version: 1.0 Data Read Access-Time: 500.0 us 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: yes Write Block Misalignment: no Read Block Misalignment: no DSR Implemented: no Device Size: 3788 (993001472 bytes) Max Read Current @ VDD min: 100.00 mA Max Read Current @ VDD max: 200.00 mA Max Write Current @ VDD min: 100.00 mA Max Write Current @ VDD max: 200.00 mA Device Size Multiplier: 512 Erase Single Block Enable: 512 bytes Erase Sector Size (SECTOR_SIZE): 128 Write Protect Group Size: 1 Write Protect Group Enable: no Write Speed Factor: 32 Max Write Data Block Length: 512 Partial Blocks for Write Allowed: no File Format Group: 0 Copy Flag: original Permanent Write Protection: 0 Temporary Write Protection: 0 File Format: 0 CRC: 0x40 Performing write test of 10485760 bytes... error: Failed to write to /sd/sdtst.bin - Success 0.52 MB/second. Performing read test of 10485760 bytes... 0.77 MB/second. Validating data on disk. Validated 8560640 bytes. Removing test file. SD Card Driver Counters maximumWaitWhileBusyTime = 95 maximumWaitForR1ResponseLoopCount = 2 maximumACMD41LoopTime = 7 cmd12PaddingByteRequiredCount = 8360 Test Completed!

adamgreen commented 8 years ago

It looks like it failed a write but errno was set to 0 which is why you see "- Success". It looks like it stopped writing at ~8.5MB but not from an error at the SD level. Is it possible that the card is full and ran out of space at 8.5MB?

wolfmanjm commented 8 years ago

yes the card was full, likes like maybe a bad partition although it works with smoothie. I tried with a different 4gb card and it works fine

adamgreen commented 8 years ago

although it works with smoothie.

It worked with this test as well, until it ran out of space :)

adamgreen commented 8 years ago

I will keep this issue open to remind me to look into why the mbed SDK doesn't set errno properly.

adamgreen commented 8 years ago

So I just looked through the mbed SDK file handling code and they almost never set errno. That is why perror(NULL) displays "Success" in that error message :( I am inclined to remove the perror() calls from that test since I highly doubt they will ever give me any useful information.

If this card still fails after freeing up space then let me know, otherwise I think this issue can be closed.

adamgreen commented 8 years ago

I updated the test code and pre-built binaries to no longer call perror() since its output is just confusing.

adamgreen commented 8 years ago

Please re-activate if the problem still occurs after freeing up space on this card.