chipKIT® Development Platform

Inspired by Arduino™

SD Card write issues

Created Mon, 23 Jan 2012 21:17:26 +0000 by nvrdunn


nvrdunn

Mon, 23 Jan 2012 21:17:26 +0000

I'm using the 0023 mpide and the included SD card lib. I have no issues reading the card info and listing the files. So the wiring seems to be fine. The issue i'm running into is writing to the card. It seems to lockup when attemping to open a file for writing. Any suggestions?

The card is 128MB card formated with fat16.

Chris


nvrdunn

Mon, 23 Jan 2012 21:18:35 +0000

And the board is a MAX32.


slayer1991

Mon, 23 Jan 2012 21:46:07 +0000

i can't even read the card with the 1221 software version:D


nvrdunn

Wed, 25 Jan 2012 21:28:30 +0000

So it's now to the point where it will open a file but dies at the "dataFile.println(dataString);" line in the example. Not sure what else to try on to get this working...

BTW, i'm using PIN 40 for CS.


nvrdunn

Thu, 26 Jan 2012 00:02:05 +0000

Another site someone had a somewhat similar issue, the fix, make sure the file you are writing to is not 0k. So I just put the SD card in my laptop, added 1 line to the text file, moved it back to the MAX32, and now it works!!


Ben78

Mon, 16 Jul 2012 13:31:22 +0000

Hello, Do you find another solution for write to the card since added 1 line before? I have the same problem and I didn't find a solution.

thanks


rasmadrak

Tue, 17 Jul 2012 13:51:22 +0000

I am pretty sure this is fixed in the latest build. What version of the MPIDE are you using?


Sixminutewarning

Tue, 18 Sep 2012 00:12:03 +0000

I was having a similar issue. I set chipselect to pin 4 (on SD shield, pin 4 = SDCS). As an output, I used pin 53 (same as Arduino Mega 2560). My jumpers were set as Master. However, it would not initialize the SD card. I was using mpide 0023 windows 20111221.

Please verify if the chipselect pin, output pin, jumper settings, and mpide version is correct.

Thank you.