STM32N657 Custom Board – External Quad SPI Flash Programming Issue
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.

