Skip to main content
Associate II
August 20, 2026
Question

STM32N657 Custom Board – External Quad SPI Flash Programming Issue

  • August 20, 2026
  • 2 replies
  • 95 views

I am working on an STM32N657 custom board.

 

Previously, on the STM32N6570-DK, we were using the Octal SPI flash MX66UW1G45GXDI00. In our custom board, we have changed the external flash to the Quad SPI GD25LB256FWIGR.

 

The Quad SPI configuration done. For firmware flashing, we are using STLINK-V3SET with STM32CubeProgrammer.

 

Current Issue

------------------

 

The STM32N657 target is detected properly in CubeProgrammer. I selected the external flash loader, firmware .bin file, and start address 0x70000000 & Appli address 0x70100000.

 

However, when I click Start Programming, the erase operation fails and the target gets disconnected automatically.

 

The CubeProgrammer log shows:

 

Memory Programming ...

File    : Camera_Dev_test_Appli-trusted.bin

Size    : 284.13 KB

Address : 0x70100000

 

Erasing memory corresponding to segment 0:

Erasing external memory sectors [256 327]

Error: failed to erase memory

Warning: Connection to device 0x486 is lost

Disconnected from device.

 

The ST-LINK connection itself is working properly, and the target is detected before starting the programming operation. The issue occurs when CubeProgrammer starts erasing/programming the external Quad SPI flash.

 

For your reference, I have attached the CubeProgrammer error screenshots.

 

Kindly review and provide your suggestions to resolve this issue.

 

Also, please let us know if any specific external loader, XSPI configuration, or CubeProgrammer settings are required for STM32N657 + GD25LB256FWIGR Quad SPI flash.



 

 

2 replies

KDJEM.1
ST Technical Moderator
August 21, 2026
To give better visibility on the answered topics, please click on "Best answer" on the reply which solved your issue or answered your question.
EXUE.2
ST Employee
August 26, 2026
  1. if the external flash loader is developed by yourself ? 
  2. as default, for MX66UW1G45GXDI00, we have developed its Octal SPI external flash loader, if it is work at your customer board? if it is, the cause is by the Quad SPI external flash loader.