wd356
Posts: 2
Joined: Sat Sep 12, 2015 4:05 am

Image SD card with SPI

Sat Sep 12, 2015 4:21 am

I need some help. A friend has a micro SD card that can no longer be recognized by computers or cellular phones. I know there is a chance I can still read the card using SPI and it's a cool project.

So far I have a Sparkfun microsd breakout board wired up to a Raspi B+ via SPI. I have spidev0.0 in my devices and test programs work. I can successfully send CMD0 and receive a response indicating idle state.

Before I dive further into writing the C code to read the card block by block can someone confirm that this is the only way to do this without wiring up mmc-spi.c and recompiling the kernel? I just want to make sure the mmc-spi driver isn't already there ready to go

Thanks and any help is greatly appreciated!

msperl
Posts: 344
Joined: Thu Sep 20, 2012 3:40 pm

Re: Image SD card with SPI

Sun Sep 13, 2015 7:02 am

Works with an old kernel, but unfortunately spi-mmc has an issue in the latest kernels, that make it not work without a patch...

wd356
Posts: 2
Joined: Sat Sep 12, 2015 4:05 am

Re: Image SD card with SPI

Sun Sep 13, 2015 8:31 pm

Thank you for the information, msperl. I'll begin hacking out the C code to read the card block by block. When it works I'll post it.

Return to “Interfacing (DSI, CSI, I2C, etc.)”