cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4Discovery + SDIO + FATFS. CubeMX 5.1.0 generated code, but it is not work.

VGris
Associate

Error in function "check_fs" in ff.c.

Line "if (ld_word(fs->win + BS_55AA) != 0xAA55) return 3;"

It always returns 3.

The code error on the function "res = f_mount(&SDFatFS, SDPath, 1)) != FR_OK"

Return value "0x0D" - FR_NO_FILESYSTEM.

microSD: class 10, 16GB, FAT32.

The oscilloscope signals are fine.

2 REPLIES 2

Hi

Check if there is a conflict between onboard audio IC and SDIO interface you use.

I think both share some pins.

So WHAT data is it reading? The error suggests it is not finding a MBR/BPB. So either card not formatted or not reading properly. Assuming it's one you've used before, I'd lean to the latter.

The STM32F4-DISCO (F407) shouldn't have any hardware issues with a correctly wired SDIO socket, from a pin or DMA perspective.

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