3 years, 2 months ago.

LPC1768 SD Card Interface

I have the LPC1768 running and performing all the functions I need as far as PC interface goes, but I am trying to get it to work with an SD card. I am using the "hello world" program form the Mbed Handbook. I imported the library and everything compiled just fine. I connected the sd card according to the specifications in the program (SDFileSystem sd(p5, p6, p7, p8, "sd"); the pinout on the mbed Cool Components workshop board) such that SDFileSystem sd(p5, p6, p7, p12, "sd"); mosi, miso, sclk, cs

However, I am NOT using the cool components board. I am directly connecting the sd card using a small jig i made. So, I may have the pins wired wrong. I am using the schematic from here: http://www.electroniccircuitsdesign.com/pinout/sd-microsd-card-pinout.html

When I run the program, I get the error: "No disk, or could not put sd card into spi idle state"

Does anyone have any idea what I'm doing wrong?

1 Answer

3 years, 2 months ago.

It could be a wiring issue, double check the pinout. It could also be a signal integrity / power issue. How short/neat are the cables? (A photo really helps here, one persons short and neat cables is another persons rats nest)? How reliable is the power to the SD card (e.g. do you have a capacitor to ground right on next to the SD card power pin)?

You can also try turning the SPI clock speed down, that can help a bit with cabling issues but from memory the default is already fairly slow.