cancel
Showing results for 
Search instead for 
Did you mean: 

I am having issues using STMCubeIDE for a project using an STM32F405 with SDIO and FatFs. My PCB contains a uSD socket with an 8GB card inserted. The system links and mounts the fatfs , buts fails to make the file system on the card(f_mkfs).

LBarn.1
Associate II

Virtually the same test code is working on a Discovery 469. I have tried to increase the stack and heap which didn't help.

4 REPLIES 4

mkfs should be the last thing you do after everything else works, cards shouldn't need formatting.

Pull-up on data/cmd lines at socket?

Turn OFF hardware flow control on F405 parts.

Instrument DISKIO layer to understand interaction and failure.

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

I tried not reformatting (no mkfs) and went from the mount to mkdir, got the same error. I have checked our hardware and also tried the same on another pcb with a 407 part, same results. However the Discovery 469 always works, and allowed me to continue working on the balance of the project. Others have mentioned issues with the CubeMX generating bad code, could this be the reason? By the way, there are pull-ups, andthe hardware flow control is OFF.

I don't use CubeMX, forum traffic suggests it is a train wreck half the time, and I already know how to write working software.

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

if CubeMX generates trash, what's next? I don't have an answer, what software is needed if you don't use it? I need the Fatfs to work with the STM32F405 in my project. I have even tried to go backwards to the IAR ide using the HAL libraries, nothing but errors. Can I use the old standard libraries?