2025-09-02 3:39 AM
I’m encountering an issue with XSPI1 in my application. I boot the application via XSPI2 in an LRUN configuration, and this part works perfectly. However, within the application, I need to use XSPI1 to write data to a different flash.
During MX_XSPI1_Init(), the code crashes at this line:
if (HAL_XSPIM_Config(&hxspi1, &sXspiManagerCfg, HAL_XSPI_TIMEOUT_DEFAULT_VALUE) != HAL_OK)
{
Error_Handler();
}
I traced the crash to the exact line:
IOM_cfg[0].IOPort = pCfg->IOPort;
The initialization code for XSPI1 was generated using CubeMX. Interestingly, if I initialize XSPI1 in the boot project, everything works fine.
I’ve already spent a week trying to solve this issue, but so far nothing has worked.
I would really appreciate suggestions to help solve my problem.
2025-09-02 4:23 AM
Hello @Danhe ,
You can use the XPI example available on our GitHub repository, which can help you with your testing. Please find the example at the following link:
https://github.com/STMicroelectronics/STM32CubeH7RS/tree/main/Projects/NUCLEO-H7S3L8/Examples/XSPI
Br