cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 CUBE SDIO 4bit problem

emre
Associate II
Posted on November 24, 2014 at 16:19

Hello;

I want to use 4Bit SDIO on STM32F407VGT6 MCU. I already set all parameters on lastest STM32CubeMx software.

RCC => External Xtall

SDIO =>4bit bus

My Ide is KEIL 4.73.

But this configuration is not working. When i use SDIO 1bit mode , it is works! 

I already tested my board and connections(pull-ups,caps...) with ''https://github.com/MaJerle/stm32f429/tree/master/21-STM32F429_FATFS'' 

4Bit SDIO Example. So my board is working 4bit SDIO mode with this example. I checked with oscilloscope. 

How can i run 4bit SDIO FATFS with STM32cubemx on STM32F4?

Bests,Thanks.

1 REPLY 1
Posted on December 11, 2014 at 14:59

Hi,

The 4-bit SD Data Transfer Mode is Mandatory for High-Speed Cards, Optional for Low-Speed ones, so it depends on the used uSD card type. Otherwise, it's better to configure first the 1-bit SD Data Transfer Mode:

hsd.Init.BusWide = SDIO_BUS_WIDE_1B;

And then, just enable wide operation, for the 4-bit SD Data Transfer Mode:

HAL_SD_WideBusOperation_Config(&hsd, SDIO_BUS_WIDE_4B);

Here below some screen captures from the RM0090 reference manual: 0690X00000602zAQAQ.jpg 0690X00000602zFQAQ.jpg PS: You can refer to the stm324x9i_eval_sd.c/stm324xg_eval_sd.c BSP drivers, that may help you! Regards, Heisenberg.