microSD Card Issue

Discussion about writing software for VS1005 and the VSOS Operating System. Also posts about VS1005-related hardware design and device drivers should be posted here.
Post Reply
User avatar
Mark
Senior User
Posts: 22
Joined: Thu 2015-06-04 5:37

microSD Card Issue

Post by Mark »

Hello,

We made a custom board for the VLSI VS1005 BOB that uses a microSD card, instead of the large SD/MMC on the VLSI eval board. The microSD is wired for SD mode with DAT0-3, CLK, and CMD . The microSD card shares its Card Detect with DAT3, I noticed on the eval board that GPIO0_9 appears to be shared function for CD as well as NAND flash.

We are not using NAND flash, so how should the GPIO0_9 be connected to the microSD card? Should it just connect to DAT3 thru a 10K? We tried pulling it high to force it but we just get the following error on start up with or without GPIO0_9:

'SD Ident / Card Stuck', and when attempting to access the card an error appears that the card is not formatted as FAT.

We have a pull-up on DAT3, but noticed the eval board schematic for the standard SD card does not. The microSD card spec calls for pull ups on CMD and DAT0-3.

Any hints?

Thank You,
Mark
User avatar
Henrik
VLSI Staff
Posts: 1294
Joined: Tue 2010-06-22 14:10

Re: microSD Card Issue

Post by Henrik »

Hello Mark!

To see how to connect a microSD card to VS1005g when there is no need for the U6 power on/off multiplexer selector in the Evaluation Board shematics, have a look at the schematics of the VS1005 Amp Board, available at http://www.vlsi.fi/en/support/evaluatio ... board.html . There are a few things to note:
  • VS1005 SD bus is connected directly to the SD card (SDBUS in the schematics).
  • You MUST have a separate regulator for SD power (J7 generating 3V3 in the schematics). When written to, SD cards can draw hundreds of milliamps which is way beyond what VS1005g regulators can provide.
  • You MUST connect a powerdown signal to the regulator so that VS1005g can do a power cycle to the SD card. That's the only reliable way to reset it. In the shematics that is done with signal PD3V3, which is connected to VS1005g pin GPIO0_7.
When you do this, you need one other thing: a driver that replaces the default SD Card power routine optimized for the DevBoard. You can do this by copying solutions/AmpBConf/AMPBCONF/AMPBCONF.dl3 to your SYS folder from the software package in this thread: viewtopic.php?f=13&t=1849 . The driver needs VSOS 3.27 or higher to work. After you have copied the driver, add the following line to config.txt BEFORE you start the SD driver:

Code: Select all

AMPBCONF
(Btw, if you look at the source code for that driver, you can see that it is very simple: just using GPIO0_7 to switch SD power on and off.)

This should do the trick!

Kind regards,
- Henrik
Good signatures never die. They just fade away.
User avatar
Panu
VSDSP Expert
Posts: 2829
Joined: Tue 2010-06-22 13:43

Re: microSD Card Issue

Post by Panu »

Hi, Mark!

Check if it works if you detach and re-attach the SD card by hand. If so, you have found your culprit.

There's discussion about a similar case in this thread: viewtopic.php?t=1860#p9359. Please see if it's helpful for you!

-Panu
Post Reply