Showing results for 
Search instead for 
Did you mean: 

Struggling to write on a SD card with the STM32F769I_DISCO


Hello everyone,

I have to work on an already existing project using the STM32F769I_DISCO which works properly. My task is to write logs in a file on a SD card. I followed the excellent tutorial by Nicolas Fillon for STMicroelectronics about the matter, using SDMMC.

First of all, the SDMMC1 is Disabled and cannot be enabled, which is why I can only consider SDMMC2. I'm following all steps from the tutorials, I can build the project without errors, but when I try to run it on the STM, no file has been created and more importantly, I have a huge UI dysfunction :

working normally.jpeg working normally, before modifications

not working properly 2.jpeg after enabling SDMMC2.


I reinstalled the project multiple times. Every time I try to enable SD MMC2, I have this bug, even when I don't add any line of code after generating the code. I don't have any errors on the build. After building the project at each step of the tutorial, I realized it happens when I enable SD MMC2 and I change the clocks (because I have an error if I let them by default), so even before enabling and configuring FATFS. The visual bug remains even after disabling SD MMC2. 

I can't manage to find any solutions about it anywhere. Has this bug ever occurred to someone and did you manage to fix it ? 

I thank you in advance for your time and your consideration. It's my first time working with an electronic board and even using C, so I surely lack knowledge and vocabulary about the matter.



So probably a pin or clock issue

Use other examples





PG9:AF11 D0

PG10:AF11 D1

PB3:AF10 D2 (check jumper/debug)

PB4:AF10 D3


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