NUCLEO-L476RG SDMMC problem
Hi everyone,
I am starting using the STM32 to store data on MicroSD card over the SDMMC port. My board is a NUCLEO-L476RG. CubeIDE version is 1.6.1 and CubeMX is 6.2.1.
My MicroSD card is a basic 2GB model, it works perfectly well when connected through card reader to a PC.
I was going by this YouTube tutorial: https://www.youtube.com/watch?v=I9KDN1o6924
Configured it the same way, didn't work. Looked at this forum, added DMA, interrupts and internal pull-ups, lowering the clock, still nothing.
It fall into Error Handler() when it tries to format the card. If I disable the formatting and go straight to creating a file, again, it falls into the Error Handler().
Here are the SDMMC settings:



Here are the FATFS settings:


Here is the detection pin and clock settings:

And here is the piece of the code. I use simple variable to tell me, where the routine fell into the error handler.

