cancel
Showing results for 
Search instead for 
Did you mean: 

SD Card breakout board

juliuscaesar
Associate III
Posted on May 21, 2017 at 22:05

hey guys,

i'm interested in a SD breakout board for my STM32F427 disco board.

I'd like to use the MCUs SDIO Pins for the communication with the SD breakout board.

Of course when you search for 'sd breakoutboard' there are millions of different boards, however i was hoping if someone could recommend my a specific sd breakout board

I have read the manual how to access an SD card using FatFS. If i got the manual correct, there are 2 ways of accessing an SD card, first way is to use SPI, the second is to use SDIO Pins. If have decided to use the SDIO.

http://entesla.com/micro-sd-breakout-board

 

The typical SD breakout boards have typical SPI pins (CS, MOSI,MISO,CLK). Since I'd like to access the SD Card not via SPI but via SDIO i was wondering if i could use these boards anyway?

For my (1 wire) SDIO solution i need 1 data in/out pin,  1 clk pin and 1 cmd pin.

Thx for your support

10 REPLIES 10
juliuscaesar
Associate III
Posted on November 08, 2017 at 23:06

hey

I finally got it to work. The key for establishing a basic communication was th use shorter cables. I'm using a breadboard with 5cm cables. I setup the gpio pins with internal Pullups as shown in Clive's picture.

I'm using the SD card in 1 bit SDIO mode.

However the Initcode was quite buggy:

1. BSP Init is never been called => i added this before the link driver part

2.the SD detect is the other way around.

SD in -->HIGH

SD out -->LOW

3.: the SD_Queue sd_diskio.c is never been initialised => i tried to init the cmsis message queue but for some reason my cmsis message queue got deleted after a while. So i replaced this with a FreeRTOS Queue -->this works fine

4. BSP_SD_WriteCpltCallback() and BSP_SD_ReadCpltCallback() are not linked to the SDIO interrupt. SO i had to attach those two to the HAL_SDIO IRQ handler

5. Make sure you enable 2 DMA Channels for SDIO rx and tx. You also have to enable the DMA interrupt otherwise it wont work.

At least for Points 1-4: @STM did you even test the init code once?

How can i report the bugs in the generated code?