2026-02-25 6:55 AM
Hello,
I'm working with the STM32H7S7L8 -DK and I need for final product to program the external OCTOSPI flash via usb DFU.
So using V2.20.0 Cube programmer i'm able to use external memory loader to read and program the flash using SWD
But using the USB i see the DFU and before i select the good external memory laoder but when i click to connect i can only programm the internal flash of the STM32 when i try to read or program the OCTOSPI flash i have error.
Do you have any ideas
Thanks
2026-03-05 4:00 AM
Hi @Hamady
You have to generate your own OBL loader for STM32H7S7L8-DK via CubeMX to be able to interface external memory via DFU (Since the loader is not included in STM32CubeProgrammer). Only OBL loaders for Nucleo-H7S3L8 are available by default.
PS: Conventional external loaders will work only via debug interfaces, for bootloader interfaces (such as USB), you'll need an OBL loader (E.g: MX25UW25645G_NUCLEO-H7S3L8-OBL.stldr)
Aziz
2026-03-06 2:26 AM
Hi @Aziz BRIGUI
Thanks for the reply.
Can you explain me the main differences that have been made to ext mem loader OBL vs the one created with cube mx.
So i can implement them in my project.
Thanks
2026-03-06 3:22 AM
Hi @Hamady,
Both types of loaders can be generated by CubeMX. You'll have to change this option:
I also recommend checking this wiki Getting started with External memory Manager and External memory loader - stm32mcu for further details.
Aziz
2026-03-06 5:05 AM
@Aziz BRIGUI
So i went to Cube MX and created a new External memory loader.
I put it in cube programmer after generation and i got this :
I'm missing some step to get it work via USB DFU ?
Thanks
2026-03-06 6:32 AM
I checked the errata for cube programmer and i saw this :
STM32H7Rx/7Sx microcontrollers:
Seeing this i don't know where to start because even if i but OBL in FLASH with only 64KB i can't put the boot next to it to start XIP
My goal is to have a way to flash a firmware via usb.
First idea was to download the firmware in .bin format and put it in PSRAM , this part works but when i go to boot i can't read the psram without hardfault but in Appli context i can. and i checked the appli part and nothing is configured for XSPI 2 but i can use PSRAM
Second idea is to use the method wrile while read described in AN6228 but it is for me a bit overkill to manage it and switch to a normal state.
Last idea is to download the firmware in a SPI flash and at the boot context use XSPI command to write to the XSPI1
I'm a bit lost with all of this and the architecture make things really hard