cancel
Showing results for 
Search instead for 
Did you mean: 

SDIO doesn't work - STM32F429ZIT - FreeRTOS - CubeMX 5.0

Zaher
Senior II

Hi,

I had a working project on the STM32F4-Discovery board (STM32F407) with FreeRTOS and FATFS on uSD card. I wanted to move to the STM32F429 because the FMC provides a lot of flexibility over the FSMC for my project.

For the life of me, I couldn't get the SDIO and FATFS to work on the STM32F429-Discovery board. I just don't know what might go wrong on this board to conflict with the SDIO as I had no problem getting things to work on the STM32F407-based board.

I have updated the CubeMX to the latest version (5.0) with latest FW package, generated project files, but still the SDIO doesn't work. It seems the problem occurs when the uC tries to configure the SDIO for 4-Bit access.

Could it be the clock configuration? I have configured it to 180 Mhz, but looking at the SDIO example from the STM324x9I_EVAL package, it was configured at 175 Mhz. I don't know if changing the clock could solve the issue, but what else might cause the issue? The HAL/SDIO driver itself?

By the way, LCD module has been removed from this board and I do not think it's a hardware conflict.

Thanks

4 REPLIES 4
Zaher
Senior II

** Update **

When the 4-Bit mode config function is commented out, the read function returns without error.

HAL_SD_WideBusOperation_Config(&hsd, SDIO_BUS_WIDE_4B);

So either a conflict remains, or you have a stub causing signal skew or reflection issues.

Check what traces you have, trim if you can. Back off slew rate of pins, and/or frequency of bus.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Zaher
Senior II

I checked the PCB many times, but couldn't see anything wrong. I will try to back off the frequency of the bus and see if that makes any difference. It is now: GPIO_SPEED_FREQ_VERY_HIGH, as generated by CubeMx.

Zaher
Senior II

Well, the only way to make it work was under the 1-Bit bus. What is the maximum data rate achieve under this mode?