Skip to main content
Visitor
October 27, 2026
Question

OTA Firmware Update on STM32H7S78-DK: NeededDesign Pattern / Examples for Updating External NOR Flash a

Hello ST Community & ST Engineers,      

     I am building a field Over-The-Air (OTA) firmware update system on the STM32H7S78-DK discovery board. The system uses an ESP32 connected over high-speed UART to transfer the updated firmware binary (2.4MB containing the application and TouchGFX GUI assets). 

Because the STM32H7S7 is a BootFlash MCU with only 64 KB internal flash and executes the application from the external 128 MB Octo-SPI NOR Flash there is no direct out-of-the-box dual-bank OTA example in the STM32Cube_FW_H7S7 package for this board.
 

  1. Background Streaming while TouchGFX is Active: The running application Appli receives 1024-byte chunks from the ESP32 over UART and stages the full 2.4 MB binary directly into external Hexa-SPI PSRAM at (on XSPI1).
    Note : Since the binary file i use is only 2.4MB is use PSRAM to store it but actually i wanted to do in NOR flash since the excepted binary is around 40-50MB(so PSRAM can’t be used in final application binary file).

  2. Safety Interlock & Warm Reset: Once 100% of the binary is staged, the user clicks "Install & Reboot" in TouchGFX. 

  3. Flashing from Bootloader : The MCU reboots into internal flash. Before launching the app via Boot_Application(), the bootloader checks PSRAM. If the flag is set, it erases the active application sectors in external NOR Flash , copies the staged image from PSRAM  into NOR Flash, clears the flag.

Problem i’m facing 

  • STM32CubeProgrammer successfully downloads and verifies the  customboot.elf at internal flash 

  • The instant the core starts running, the board disconnects from ST-LINK:

  • The LCD stays black, and STM32CubeProgrammer cannot reconnect in Normal mode. Can able to connect in Under reset mode

  • Conversely, if we flash an unmodified TouchGFX Designer demo, the board boots and runs normally.

    Note : I also tried the Boot.elf which is not modified, flashing through STM32CubeProgrammer causes me same problem as customboot.elf  

My Questions 

  • Does ST provide an official application note, GitHub reference, or recommended design pattern for OTA updates on the STM32H7S/H7R series?

    • Standard AN3155 / dual-bank internal flash examples do not apply to BootFlash MCUs where the application lives in external XSPI NOR flash. What is ST's recommended architecture for updating the external XSPI NOR Flash image?

  • MPU & HardFault Lockup in Boot :

    • Why does accessing or attempting to read external memory before Boot_Application(), cause a severe bus fault that terminates the SWD connection (Error: Unable to get core ID)?

    • why even flashing unchanged / defualt boot.elf is causing the same problem . i don’t know what the real problem is.

       

       

  • Flashing Procedure with STM32CubeProgrammer:

    • When programming Boot vs Appli , should the external loader to  be unchecked when programming Boot to prevent loader conflict on reset?. Cause I unchecked it. 

Any guidance, code snippet, or architectural advice for safely copying staged firmware into external NOR Flash during boot would be greatly appreciated.

Thank you!