cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4 SPI SD Card Problem

emsing007
Associate
Posted on October 11, 2014 at 16:15

Hello!

I use STM32F4 Discovery and SD Card (library ChaN: https://github.com/devthrash/STM32F4-workarea/tree/master/Project/FatFS).

I complied program from example (main.c in Project) and SD card not work.

In debug mode program stop on 228 line in file diskio.c

228: (SPI_receive(SPI1, buf, 2); // receive two byte CRC

Connection:

CS -> PC4

SDI (MOSI) -> PA7

SDO (MISO) -> PA6

CLK -> PA5

#sdcard-spi
1 REPLY 1
Posted on October 11, 2014 at 16:38

Sounds like you're going to need to break out a debugger and scope out and start to understand what's going on, what the code you're using does, and how it interacts with the circuit/card you've interfaced.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..