Skip to main content
Associate II
July 15, 2025
Question

External flash loader for STM32H735AGIx using OCTOSPI1 on MX25LM51245g partly working

  • July 15, 2025
  • 2 replies
  • 321 views

Hello everyone,

I'm currently working on a custom board with an STM32H735AGI6, and I'm trying to create the external loader for the MX25LM51245g NOR flash on it. I use the OCTOSPI1 for the communication.

 I first created a basic project using STM32CubeIDE in version 1.18.1 to validate the OCTOSPI communication and hardware of my board. And I'm able read/write the register of the external flash, as well as erasing block or full chip, and writing data into it.

Then I tried to create the external loader fallowing this tutorial : https://controllerstech.com/w25q-flash-series-part-10-qspi-ext-loader-in-h750/ adapting it to my needs.

My problem is that when I test my external loader, through the STM32CubeIDE or the STM32CubeProgrammer, by erasing the first block and writing into it, the erase goes well, but I next get the error log 'failed to download sector[0].

I debug my external loader project directly from the RAM (0x24000004) address using STM32CubeIDE, and I'm able to erase and write as well.

I attached to this post the project I use to debug the OCTOSPI com and to create the external loader.

Thanks by advance for your help !

2 replies

KDJEM.1
Technical Moderator
July 15, 2025

Hello @mathieu1;

 

Could you please check the memory parameters settings in Dev_Inf.c and precisely "Sector Size".

May MX25LM51245G_STM32H735G-DK project can help you to check your project.

Did you get the receive the same error mentioned in this FAQ Custom external loader "failed to download segment[0]" ?

 

Thank you.

Kaouthar

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.
mathieu1Author
Associate II
July 15, 2025

Hello @KDJEM.1 ,

The memory paramters settings are good, given to the ones in the demo project and the datasheet of the MX25LM flash.

My error is :

Error: failed to download Sector[0]

Error: failed to download the File

 

I tried to add the functions of the FAQ you provided, but the error is still the same.

 

Thank you,

Mathieu

mathieu1Author
Associate II
November 6, 2025

Hello the community !

After a little break from this topic, I'm back trying to make it work, but still not succesfull... Any helps ..?

Since my last message I tried a lot of different project, thanks a lot to @Tesla DeLorean for his amazing work and help to the community, but i still can't manage to make it work, and I absolutely don't know what am I doing wrong.

 

  Thnaks a lot by advance for your help