Associate III
August 28, 2023
Solved
system_stm32f4xx.c wrong code (SDRAM banks, GPIO_AFR)
- August 28, 2023
- 2 replies
- 1731 views
Hi
I find these issues with the system_stm32f4xx.c file which CubeMX "generates":
(a) CubeMX has Bank1, Bank2 enabled. Code generated is only for Bank1.
(b) CubeMX setting of pins (e.g/ AFR, MODER) does not match CubeMX Pinout.
IOC attached.
It seems that the system_ file may be a generic file (I have seen this around for years with the same flaws) and not generated based on CubeMX settings. This seems wrong. Once known the workaround is easy (i.e. write your own for each project, modifying the code as you need). If not you may (will) get Failure to Launch if your stack / heap is in the SDRAM.
Regards
Mark

