cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F412G-DISCO incorrectly configured by STM32CubeMX

edillere
Associate

I'm starting a project and need to use the STM32F412G-DISCO board for initial development.

I already had one board purchased in 2020.

I downloaded the latest STM32CubeMX and created a new project based on this board with all default options. STM32CubeMX includes, by default, SDcard support.

When I flash the generated code, the MCU enters the Error_Handler during initialization, right in the 

SD_WideBus_Enable(SD_HandleTypeDef *hsd) call.
I commented out the SD initialization in main.c and then the program runs ok.
So, for some reason the SDcard initialization crashes the code.
Looking for a possible cause for this problem I downloaded also the latest demo binary (ver. 1.3.0) from ST's website. Flashed it and... doesn't run, the board does nothing an, I suspect, the code is also crashing during initialization.
 
Looking on the web, I found a couple post from people indicating that the pinout generated by newer versions of STM32CubeMX for this board by default is incorrect.
 
So I looked for any information about different versions of this board or any erratas but nothing is posted.
Looking in an old PC, I found the old demo binary version 1.2.0 from 2020, flashed it an, voila! it works!!!
 
This seem to confirm that the board configuration is messed up in latest versions of STM32CubeMX and, hence, in the latest demo binary posted by ST (most likely generated using the same new version of the tool).
 
I wonder if ST is aware of these problems and if there's any documentation clarifying the changes and suggesting workarounds, since, I suspect the issue with the SDcard may not be the only difference.
 
Also, if there's a way I can get the old SW package that came with the old boards.
My board is STM32F412G-Disco with PCB MB1209 D-2.
The page for this board on ST's website seems to have been cleaned up and there's no way to get the support package of SW that, previously, was shipped with this board.
 
Thanks
E.
0 REPLIES 0