2026-05-10 11:11 PM - last edited on 2026-05-11 3:23 AM by mƎALLEm
I am working on SDRAM execution using FMC on STM32H563ZI (NUCLEO-H563ZI board) with external SDRAM connected through FMC interface.
Our target is:
We are facing an issue where:
Below are the detailed steps and observations.
Reset_Handler
→ SystemInit()
→ PLL/System clock configuration
→ FMC GPIO configuration
→ FMC SDRAM initialization
→ SDRAM command sequence
→ __main()
→ scatter loading
→ main()
We intentionally moved FMC/SDRAM initialization into SystemInit() so that SDRAM becomes available before scatter loading.
We configured PLL through direct register-level programming.
Configuration:
PLL configuration registers used:
We observed:
However, execution from SDRAM still fails.
We suspect there may be an FMC kernel clock stabilization issue immediately after SYSCLK switching from HSE/HSI to PLL.
All FMC pins are configured through direct register-level configuration (without HAL).
Configured pins include:
GPIO configuration:
GPIO clocks enabled:
FMC clock enabled through RCC->AHB4ENR.
SDRAM configuration:
Timing configuration used:
These values are based on CubeMX-generated settings.
The following sequence is executed:
Refresh rate currently configured approximately around:
683 (based on 90 MHz FMC clock)
MPU region configured for SDRAM:
Observed results:
However:
This suggests SDRAM works during later runtime but may not be stable during early startup/scatter loading.
We suspect one or more of the following:
We request support regarding:
Please let us know if you need:
Thanks & Regards,
2026-05-11 2:16 AM - edited 2026-05-11 2:18 AM
Hello @shashank78Khandve and welcome to the ST community,
I cannot help you in the SDRAM calculation timings and parameter, meanwhile you can refer to this article / example: How to set up the FMC peripheral to interface with the SDRAM IS42S16800F-6BLI from ISSI
Also, I'm wondering how are you connecting an SDRAM to the NUCLEO. You need to take care about the signal integrity aspects as high frequencies are involved. Refer to this article: How to avoid signal integrity issues on the STM32H7R7/S7 and AN4803 "High-speed SI simulations using IBIS and board-level simulations using HyperLynx® SI on STM32 MCUs and MPUs".
For scatter loading, your process seems to be correct. SDRAM and its respective GPIOs need to be initialized before main(), i.e. in SystemInit(). Unfortunately there is no example available on STM32H5 for this scenario but STM32H743, has such implementation in the HAL, especially in system_stm32h7xx.c
You need to look at blocks where DATA_IN_ExtSDRAM is defined.
Meanwhile, the SDRAM region in STM32H5 is in the range of 0xC000 0000 to 0xDFFF FFFF, according the reference manual RM0481:
While, by default, the region is in execute never configuration (XN), according to the programming manual PM0264:
So most probably that's why you are facing a hard fault while executing from SDRAM. You should configure that region to make it executable using the MPU before jumping to the main.
Hope that helps.