cancel
Showing results for 
Search instead for 
Did you mean: 

DFU STM32H7S7L8 + External Loader

Hamady
Senior

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 

5 REPLIES 5
Aziz BRIGUI
ST Employee

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


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
Hamady
Senior

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

Hi @Hamady,

Both types of loaders can be generated by CubeMX. You'll have to change this option:

Capture d'écran 2026-03-06 121649.png

I also recommend checking this wiki Getting started with External memory Manager and External memory loader - stm32mcu for further details.

Aziz


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
Hamady
Senior

@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

Hamady
Senior

I checked the errata for cube programmer and i saw this :

STM32H7Rx/7Sx microcontrollers:

  • Erasing the external flash memory is not supported using IWDG.
  • GUI: the external memory edition is not supported via USB and UART while connected to the OpenBootloader.
  • Option bytes are not supported via OpenBootloader interfaces.

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