Skip to main content
Associate III
Apr 25, 2024 7:04 AM UTC
Question

How to connect microsd card in stm32f407

Hii, I was trying to connect microsd card module with stm32, i was unable to connect with it because the SDIO interface was not available at stm32f407 discovery board. also it support spi communication but not getting how to get with it. can some one suggest how to do it.

 

This topic has been closed for replies.

7 replies

Senior
Apr 25, 2024 7:40 AM UTC

It is possible to use an SD card with SDIO interface on the STM32F407 discovery by building a simple adapter for the pin headers. You can carefully solder wires to an SD-microSD adapter and insert a microSD card.

20150306_012745.jpg20150306_125544.jpg

 

But beware, the F407 has silicon bugs in the SDIO hardware which limits the maximum possible frequency. See the errata sheet. Those are fixed in newer controllers such as the F746. The 32F746GDISCOVERY happens to have a microSD slot with full SDIO wiring, which is much easier to use than this adapter.

Tesla DeLorean
Guru
Apr 25, 2024 8:03 AM UTC

As I recollect the PLL can run the SDIO at 75 MHz giving a 37.5 MHz wire speed which can get quite serviceable performance from the cards.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Shubham08Author
Associate III
Apr 25, 2024 12:05 PM UTC

yes but in the discovery board the pin is not available to select ie. in cube mx 

Shubham08_0-1714046660562.png

 

Senior
Apr 25, 2024 12:46 PM UTC

It probably collides with some on-board periphery in a harmless way. I don't remember the details. Check which pins are needed for SDIO and how they are used on the board. You can probably ignore the collisions. Disable the periphery blocks that cause collisions (probably the audio codec).

Shubham08Author
Associate III
Apr 26, 2024 8:11 AM UTC

Can you suggest me with using the microsd card module uing SPI interface

Senior
Apr 26, 2024 8:31 AM UTC

I haven't used SPI with SD-Cards yet, but there should be plenty of examples online