2025-09-18 7:33 AM - edited 2025-09-18 7:34 AM
I have just received my STM32N6570-DK and tried to flash the external memory
Whatever I do :
* program an Hex file
* erase single sector
* erase full memory
I always have the same error : failed to erase memory
I have tried to revert cube programmer to version 2.19 but I still have the error.
The bios of the board has been updated
Any idea of what to do ?
2025-09-18 9:50 AM
Hello @benabes
Maybe you have the same issue as this thread: Solved: STM32N6570-DK: Unable to erase external flash.
Check the boot mode and try setting it to "Development Boot".
2025-09-19 1:09 AM
The boot mode of my card is already Development Boot.
(I Have tested by booting with all switches positions).
I am able to compile are run example projects on sram. The card is OK.
But still unable to flash.
2025-10-09 1:30 PM
I'm having a similar issue and I'm unable to erase my STM32N6570-DK.
I am in Boot mode 1, as described.
But the Erase Tab in CUbeProgrammer is empty. Also flashing seems to be broken, as it reports me that flashing was successful, but after a reset (and going back to Boot1=0) it will just go on with the demo application and ignore my firmware.
And erasing via CLI is also not possible:
$ ~/st/stm32cubeclt_1.19.0/STM32CubeProgrammer/bin ./STM32_Programmer_CLI --connect port=swd mode=HOTPLUG ap=1 -el /home/user/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin/ExternalLoader/MX66UW1G45G_STM32N6570-DK.stldr --download /home/user/Documents/zephyr/stm32n6/zephyrproject/zephyr/build/mcuboot/zephyr/zephyr.bin 0x70000000 --start
-------------------------------------------------------------------
STM32CubeProgrammer v2.20.0
-------------------------------------------------------------------
ST-LINK SN : 002100363234510E37333934
ST-LINK FW : V3J16M8
Board : STM32N6570-DK
Voltage : 3.27V
SWD freq : 8000 KHz
Connect mode: Hot Plug
Reset mode : Software reset
Device ID : 0x486
Revision ID : Rev B
Revision ID : Rev B
Device name : ST32N657
Device type : MCU
Device CPU : Cortex-M55
BL Version : --
Opening and parsing file: zephyr.bin
Memory Programming ...
File : zephyr.bin
Size : 42.52 KB
Address : 0x70000000
Erasing memory corresponding to segment 0:
Erasing external memory sector 0
Error: failed to erase memory
Error: failed to erase memory
Any idea whats causing this?
2025-10-11 9:46 AM
I at least to some extent found the error, as I wasn’t able to flash. My path had a broken signing tool, which caused the image not to be signed by my build system.
But it is strange that there is no warning or error when you try to flash an unsigned image. I would have expected this instead of a simple “flash successful,” which wasn’t true. Maybe that’s something you want to look into, as that sounds like a bug to me.
Oddly enough, I still can’t erase the flash, as no registers are displayed in CubeProgrammer. I probably won’t look into that anymore, as I’m now able to flash something.