SD Card Functionality + MOD5270

Discussion to talk about hardware related topics only.
Post Reply
obnauticus
Posts: 4
Joined: Mon Jun 20, 2011 12:11 am

SD Card Functionality + MOD5270

Post by obnauticus »

I am having a few issues trying to get the SD card interface working with my MOD5270 (Carrier Board v1.08). In all of the demonstration programs all of them are saying the SD Card is write protected (I checked multiple times, the card isn't in the write-protection mode). I have even tried modifying the existing libraries to force get_wp to return a 0 (as defined here: http://www.netburner.com/downloads/samp ... icroSD.pdf ); however, this did not fix the issue either.

Right now I have a demo application successfully loading and mounting the card, but whenever I try to write anything it fails (when I try to put a new file on it via FTP when running the EFFS-FTP example it says Time stamping failed: 23). Another weird thing is that it (successfully) can determine how much space I have left on any SD card I throw into the slot, which makes me think it's not a pin configuration issue; however, after reviewing the J2 pinouts on the MOD5282 and MOD5270 (in accordance with the article posted above) I am starting to think my Carrier Board may not be interfacing correctly with the SD Card slot since J2-35 on the MOD5282 is the QSPI ChipSelect 2 pin, and on the MOD5270 it's the DMA Timer 2 I/O. This is very confusing to me since MOD5270/system/mmc_mcf.cpp says J2[35] is supposed to be configured as a GPIO for SD/MMC control on both the 5282 and 5270.

In short, nothing I am doing is letting me write to an SD card with my MOD5270. Even the example applications are saying my SD card is write protected (even when it is not); if I skip the write protection checking (c.f., using a microSD card w/ a MOD5282) no files are written and various functions are returning F_ERR_WRITEPROTECT (error code 23).


Thanks in advance.
Thomas.
obnauticus
Posts: 4
Joined: Mon Jun 20, 2011 12:11 am

Re: SD Card Functionality + MOD5270

Post by obnauticus »

I got it working.

For anyone who has the same problem in the future: JP15 needs a jumper to connect the MOD-DEV-100 (Carrier Board v1.08 here) board's SD WP pin to the correct pin to match the pin config in the demo applications.
rnixon
Posts: 833
Joined: Thu Apr 24, 2008 3:59 pm

Re: SD Card Functionality + MOD5270

Post by rnixon »

Be careful with the power issue as you had in your last post. A external flash file system is not power fail safe, meaning you can get corruption if you are writing data when power goes out and the processor can no longer function properly.
obnauticus
Posts: 4
Joined: Mon Jun 20, 2011 12:11 am

Re: SD Card Functionality + MOD5270

Post by obnauticus »

I'm going to put a small SLA backup battery on it + a regulator. This will allow for charging from the alternator...but SLA's are heavy so it'd be nice to do it with something lighter. Oh well.
Post Reply