Skip to main content
NAmam.2
Associate III
October 14, 2026
Question

XIP (Execute-In-Place) from external QSPI flash on the STM32U5G9

Hello,

I am working on a requirement involving XIP (Execute-In-Place) from external QSPI flash on the STM32U5G9 and am encountering an issue executing the application from external flash.

I have developed a working external flash loader for my QSPI memory and successfully programmed a simple GPIO toggle application into external flash.

In the bootloader, I initialize the QSPI interface, configure the flash in memory-mapped mode, and then jump to the application located at 0xA0000000.

Using the debugger, I can confirm that execution reaches the application's Reset_Handler at 0xA00002B4. However, when executing the very first assembly instruction, the processor enters HardFault_Handler at 0xA0000458.

The fault status registers indicate:

  • CFSR = 0x00000001 (Instruction Access Violation)

  • HFSR = 0x40000000 (Forced HardFault)

  • MPU is disabled

  • VTOR = 0xA0000000

I have also verified that the application vector table contains valid stack-pointer and reset-handler addresses, and that the external flash contents can be read correctly through the debugger.

I am unable to determine why XIP execution is failing despite the QSPI memory-mapped interface appearing to work correctly.

Has anyone encountered a similar issue or have any suggestions on what I should check?

I would be happy to share my bootloader and application code for further review if needed.

Thank you in advance for your help.
Naga.