cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 sdio sdhc 4gb problem

yigit
Associate II
Posted on September 13, 2012 at 08:37

Hello,

I've a problem with sdhc used with sdio in stm32f4-discovery platform. I've tried 2 versions of fat file system and sd driver, but I am not able to run sdhc properly.

The things I tried;

1) Nemui's sdio implementation with chan's fat version 0.09a.

2) stm324xg-eval implementation with also chan's fat 0.09.(which is used from stm32-demonstration builder)

Both codes are working perfectly with standard sdsc card (which are below 2gb) but when I insert a FAT32 formated sdhc card, the following occur.

1) SD_init() returns OK

2) f_mount() returns OK

3) f_open with create new file option returns OK

4) f_write returns OK with byteswritten value returned as expected.

5) f_sync returns OK

but when I connect the sdhc card to pc there seems nothings has been written.

Also there exists only one file in sdhc named as ''audio.wav'', f_open to this file returns FR_NO_FILE

the standard sdsc versions are working perfectly, the init sequence seems to support sdhc but there must be something I forget.

Can you please help me ?

Regards,

Yigit

#stm32-sdio-sdhc #sdio-sdhc-stm32 #stm32-sdio-sdhc #stm32-sdio-wide-mode-sdhc
30 REPLIES 30
Posted on February 09, 2015 at 02:05

Well I don't work directly with any hardware where I have USB-HS with the External PHY.

The SDIO can go very fast, but this is generally incompatible with USB as it pushes the 48MHz PLL Q Tap up toward the 75 MHz ceiling, the BYPASS mode on the SDIO has an errata on it. You'd want to benchmark the performance of the SD Card by itself. Then look at where the MSC device is spending it's time, making sure it doesn't copy data about.

It's my understanding that using the External PHY's clock permits an F42x part to run at 180 MHz, and still support USB, which would be impossible in FS mode as the divider settings would not permit a 48 MHz to be generated.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..