Smithfield, Rhode Island
Offline
God Member
Karma: 2
Posts: 825
|
 |
« on: July 24, 2011, 12:29:10 am » |
Hi All...
I have been usign the latest SDFat beta quite successfully with a 256MB San Disk SD card. I just tried a 2GB card, also a blue San Disk.
When I run the bench application, i getL
Type any character to start Free RAM: 14998 Type is FAT16 File size 5MB Starting write test. Please wait up to a minute
I wait and wait, over 5 minutes, and finally remove the card, and i get:
error: write failed SD errorCode: 0X15
During all this, my L LED is lit steady. The card has a file called bench.dat that is 0 bytes long.
Any ideas?
Thanks...
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Edison Member
Karma: 28
Posts: 1077
Arduino rocks
|
 |
« Reply #1 on: July 24, 2011, 03:15:53 pm » |
The file system on the card may be corrupt. Check it on a PC with the properties->tools tab of file explorer. Try reformatting with either the SdFormatter sketch in examples or this utility https://www.sdcard.org/consumers/formatter_3/You should use the latest non-beta here http://code.google.com/p/sdfatlib/downloads/list. If you still have problems, run the SdInfo.pde example and post the output.
|
|
|
|
|
Logged
|
|
|
|
|
Smithfield, Rhode Island
Offline
God Member
Karma: 2
Posts: 825
|
 |
« Reply #2 on: July 24, 2011, 03:22:57 pm » |
Okay thanks very much. It came out of my Daughter's digital camera and I can read the file system on Windows 7. I can't reformat it, it has data that the kid wants to keep.
I didn't realize you had released it, I'll upgrade. Thank you very much!
Jim
|
|
|
|
|
Logged
|
|
|
|
|
Smithfield, Rhode Island
Offline
God Member
Karma: 2
Posts: 825
|
 |
« Reply #3 on: July 24, 2011, 03:24:40 pm » |
Oh the latest is 20110702, that is the one I am using.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Edison Member
Karma: 28
Posts: 1077
Arduino rocks
|
 |
« Reply #4 on: July 24, 2011, 03:33:32 pm » |
You should backup the files on the card and check it for errors.
If the card has lots of file and is nearly full, bench.pde can take a very long time trying to find free space.
I suspect there may be lost clusters on the card so it probably needs repair.
|
|
|
|
|
Logged
|
|
|
|
|
Smithfield, Rhode Island
Offline
God Member
Karma: 2
Posts: 825
|
 |
« Reply #5 on: July 24, 2011, 04:24:43 pm » |
Okay, I'll do that thanks. Can your library support cards as big as FAT16 supports?
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Edison Member
Karma: 28
Posts: 1077
Arduino rocks
|
 |
« Reply #6 on: July 24, 2011, 05:11:45 pm » |
SdFat supports standard SD cards from16 MB to 2 GB as FAT16.
SdFat supports SDHC cards from 4 GB to 32 GB as FAT32.
|
|
|
|
|
Logged
|
|
|
|
|
Smithfield, Rhode Island
Offline
God Member
Karma: 2
Posts: 825
|
 |
« Reply #7 on: July 24, 2011, 05:24:30 pm » |
Great, thanks! I just got a new 4GB card, which came formatted as FAT32. In case anyone is interested, I ran bench and geot a write speed 128 Mb/s. Formatted with your formatter, re-ran bench, same result. My 256MB FAT16 card writes in excess of 260 Mb/s. Both SanDisk cards.
I sure wish I could find a source of 256MB cards, but I can't. Maybe they don't even make them anymore. Who knows.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Edison Member
Karma: 28
Posts: 1077
Arduino rocks
|
 |
« Reply #8 on: July 24, 2011, 05:44:20 pm » |
It is not the card size. Many new cards don't perform well with the single block write commands that must be used on the Arduino for file writes.
The old style cards are no longer available.
Fast cards expect multiple block writes.
I get about 600 KB/sec on multiple block raw writes with new cards. I use these commnds in the binaryLogger program.
|
|
|
|
|
Logged
|
|
|
|
|
Smithfield, Rhode Island
Offline
God Member
Karma: 2
Posts: 825
|
 |
« Reply #9 on: July 24, 2011, 05:47:23 pm » |
Sorry, I was not clear at all. The primary reason I wanted the 256MB cards is to bundle them with a board, but the faster speed is nice as well. I'll see if I can make my code work like your binary logger example, but I am pretty sure you and I discussed this and you told me that, because the user is prone to removing the card or shutting down the board at any time, I can't do it that way. Thanks again for the help and the library!
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Edison Member
Karma: 28
Posts: 1077
Arduino rocks
|
 |
« Reply #10 on: July 24, 2011, 05:58:33 pm » |
Your right, it's not practical with the Arduino to use the binaryLogger method for most apps.
Consumer devices like cameras have lots of memory, and save to the SD before really powering down.
They know when you open the SD door and quickly save.
New 4 GB cards are cheaper than old 256 MB cards, under $10.
|
|
|
|
|
Logged
|
|
|
|
|
Smithfield, Rhode Island
Offline
God Member
Karma: 2
Posts: 825
|
 |
« Reply #11 on: July 24, 2011, 06:29:05 pm » |
Wow, I just found a source for Class 2 San Disk SD cards for $1.80 each!
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Edison Member
Karma: 28
Posts: 1077
Arduino rocks
|
 |
« Reply #12 on: July 24, 2011, 07:05:08 pm » |
Most cheap places add a lot of shipping. Delivered class 2 cards should be less than $5.
Class 10 4GB cards delivered from Amazon are $7.99 total.
|
|
|
|
|
Logged
|
|
|
|
|
Cape Town South Africa
Offline
Edison Member
Karma: 16
Posts: 1099
A newbie with loads of posts, and still so much to learn !
|
 |
« Reply #13 on: August 09, 2011, 08:52:54 am » |
FWIW I have been able to pick up 256Mb cards cheap from camera repair shops, they always seem to have some in the drawer. They are the only things that work in my message anouncer.
|
|
|
|
|
Logged
|
We live in the era of the smart phones and stupid people.
|
|
|
|
|