STM32N6570-DK: FSBL stuck at MX_EXTMEM_MANAGER_Init()
- February 22, 2026
- 2 replies
- 165 views
I am using the STM32N6570-DK and I want to use the external PSRAM to declare a large variable buffer. Here is what I have done:
1. Initialized XSPI1 and the External Memory Manager. The PSRAM parameters I got from How to execute code from the external PSRAM using the STM32N6 .
2. Set the XSPI1 clock to 200MHz. Here is my system clock configuration:

Here is my main code from the FSBL. I also added a `gpio_toggle` to turn the user LED on before `MX_EXTMEM_MANAGER_Init()` as a debug indicator.
After adding the header and programming, the FSBL boots correctly — the user LED turns on — but then it gets stuck at `MX_EXTMEM_MANAGER_Init()` and never jumps into the `while` loop.
int main(void)
{
/* USER CODE BEGIN 1 */
/* USER CODE END 1 */
/* MPU Configuration--------------------------------------------------------*/
MPU_Config();
/* Enable the CPU Cache */
/* Enable I-Cache---------------------------------------------------------*/
SCB_EnableICache();
/* Enable D-Cache---------------------------------------------------------*/
SCB_EnableDCache();
/* MCU Configuration--------------------------------------------------------*/
HAL_Init();
/* USER CODE BEGIN Init */
/* USER CODE END Init */
/* Configure the system clock */
SystemClock_Config();
/* USER CODE BEGIN SysInit */
/* USER CODE END SysInit */
/* Initialize all configured peripherals */
MX_GPIO_Init();
MX_USART2_UART_Init();
MX_XSPI1_Init();
MX_XSPI2_Init();
HAL_GPIO_TogglePin(GPIOO, GPIO_PIN_1);
MX_EXTMEM_MANAGER_Init();
/* USER CODE BEGIN 2 */
/* USER CODE END 2 */
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
HAL_GPIO_TogglePin(GPIOO, GPIO_PIN_1);
HAL_Delay(1000);
}
/* USER CODE END 3 */
}**Questions:**
1. Did I configure something wrong? Is there anything else that needs to be configured?
2. Is there another way to place an image buffer into RAM?
**Tools used:**
- STM32CubeMX 6.16.1
- STM32CubeIDE 2.0.0
- STM32CubeProgrammer 2.21.0
