This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

stm32L1xx microSD driver question

Hello i'm using the SD via SPI driver provided by STmicroelectronics in the stm32l152-eval_fw.zip, with a SanDisk 2GB microSD
I extract the following file:
stm32l152_eval.h
stm32l152_eval.c
stm32l152_eval_spi_sd.h
stm32l152_eval_spi_sd.c
And use it as low level driver for the FatFS ChaN's Module, everything work perfect.
Before all that i made some research and find that in the initialization process the SPI clock rate must be set between 100kHz and 400kHz, send some clock pulses with CS high, then send some initialization commands and then the clock rate can be set up to 20-25MHz (this is card dependent).
When i read the drivers source code realize that they(STMicroelectronics) set the SPI prescaler to 2 giving, in my application, a SPI clock of 6MHz, and everything works fine. The process of setting the *** to 400KHz and then rise it is completely bypassed.
So my question is: What i am missing?
Thanks for your time.

0