2026-01-23 12:08 AM
Hi,
The external nor flash AT25XE321D is 32Mbits, support quad IO/XIP spi operation, max. 133MHz Freq. Std. JEDEC/SFDP. It is connected to STM32H7R7Z8J6 with with XSPI1 port-1 interface.
I am using MX v6.116.1 to setup project for my board. By IDE v2.0.0, the project 'Boot' works from internal flash but it is failed to run 'Appli' from external AT25XE321D. And the project 'ExtMemLoader' is successfully built and deployed:
I tried STM32CubeProgrammer v2.21.0 to program the AT25XE321D with using the ExtMemLoader.stldr I just built, but failed too. "Error: Mass erase operation failed." See attached log for more logs.
Back to my settings in MX:
1) 100MHz XSPI1 clock source
2) XSPI1 settings and GPIOs
There 4 memory types available and no 'custom' option. I pick the 'Macronix' as it is most close to AT25XE321D.
3) ExtMemLoader settings
I also go through followings but did not help me to solve the problem:
Can any one give me hand, thanks in advance!
2026-01-23 2:45 AM
Hello @Leo2Ruan ;
To choose the memory type you need to refer to memory datasheet and check the data ordering.
Micron mode, D0/D1 ordering in DTR 8-data-bit mode.
Macronix mode, D1/D0 ordering in DTR 8-data-bit mode. Regular-command protocol
Macronix RAM mode, D1/D0 ordering in DTR 8-data-bit mode.
Also, I recommend you to take a look at this wiki article Getting started with External memory Manager and External memory loader - stm32mcu and get inspired to configure your project.
This article introduces the External Memory Manager and External Memory Loader in order to:
I hope this help you.
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.