AnsweredAssumed Answered

Using ST's FATFS within CubeMX for STM32F4xx - lack of info

Question asked by childress.steve on May 22, 2015
Latest reply on Jun 2, 2015 by Burton.Mark
I'm reasonably competent in using CubeMX, STM32F4xx with IAR.
I added the SDIO driver for micro-SD cards, via the latest HAL libraries that CubeMX utilizes.

I have this ID'ing and doing read/write at the driver level (HAL calls). It works with only 1/3 of the brands of SD cards; 2/3 either don't ID reliably (init at 400KHz), or they give 100% read errors - code 3 = CRC error on command responses. 
I 'scope checked the SCK and DO/DI signals - waveform quality good. PCB wiring is short/OK (my project's PCB). Vcc OK. I slowed the SCK to 4MHz. No help. But 2 brands of uSD cards work reliably. All are type 2 8GB. SDIO is running with ONE serial channel, not 4.

Now I decided to try ST Micro's adaptation of ChanFS (FAT FS) that's an option from CubeMX. The init calls in main() from CubeMX include   MX_FATFS_Init() and that is no where in the sources. I found a "thirdparty" folder in my windows home lib area and in there is the sources to FATFS for ST. But CubeMX did NOT pull any of these into the IAR project.

I read this ST document

User manual
Developing Applications on STM32Cube with FatFs

And found it to be  useless, written by someone from another galaxy and does not talk about how to truly get the sources into the (IAR) project and do a build, esp. w.r.t. CubeMX. So ST paid someone for nada.

Anyone out there know how I can (a) troubleshoot why some uSD cards work with the SDIO driver in the latest HAL libraries but most cards don't; (b) how to get FATFS to run on a custom board using CubeMX, STM32F4xx? Maybe a miracle will occur, but FATFS uses the same problematic drivers as I see.

Thanks much.  I have spent way too much time on this!!

(PS: I cannot use the legacy ST peripheral drivers)