cancel
Showing results for 
Search instead for 
Did you mean: 

SPI configuration problem on STM32F4 Discovery

cagibomber
Associate II
Posted on August 07, 2012 at 18:55

Hi everyone,

I am trying to send some bytes of data on a sd-card (8GB) using SPI.

I started with wiring the sd slot and configuring the spi but I have nothing, not even the clock...

I have followed what's explained in the file spi.h and seen other post about spi but I still don't see where I am wrong.

I'd really appreciate if you can help me with it ! Thank you.

#spi-sd-card-stm32-discovery
33 REPLIES 33
cagibomber
Associate II
Posted on August 17, 2012 at 00:37

Hello,

I finally found something !

I had changed the ''1b'' of the bus width for ''4b'' in the error function instead of  init function...

Now the ''SD_Init()'' function returns ''SD_START_BIT_ERROR''.

I have followed the code and arrived at a function that returns this error if the SDIO_FLAG_STBITERR != RESET.

My SDIO CLK is stuck at 400kHz even if I don't divide it... 

Any idea of where it comes from ?

Also, should I Enable the SDIO_ClockBypass ?

Thank you.

Cesar cfg
Associate II
Posted on March 05, 2013 at 12:48

Hi 

i am using the stm32f10b eval board and i want to save a text file into a micro sd card ,i know that i should use the fatfs file system but i am not able to integrate the library in my project .

so my question is there a library distinated to stm32f10b or someone who had used it.

thanks 

Posted on March 05, 2013 at 15:37

I'm not using the F1 commercially and don't have an STM3210B-EVAL. I think it uses the SPI bus to access the cards, and the V3.5.0 library looks to have SPI_SD support code, and projects for the EVAL board.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Cesar cfg
Associate II
Posted on March 05, 2013 at 16:49

i can not find this library