Skip to main content
AM-adben
Associate II
January 3, 2025
Solved

STM32N6570-DK: Unable to erase external flash

  • January 3, 2025
  • 1 reply
  • 4085 views

Hi, I can't erase the external flash or write a new binary on my STM32N6570-DK board. My problem is similar to this post: STM32N6570-DK: Cannot erase external Flash. But the solution in that post didn't work for me.

I have tried using two external loaders (MX66UW1G45G, OTP_FUSES) and also with only one loader (MX66UW1G45G). But everytime the erase is failed with this message: `Error: Mass erase operation failed. Please verify flash protection`.

I am sharing some screenshots and my OTP export for your reference.

Please let me know how to unlock the flash so I can program it.

OTP screenshotOTP screenshot2 loaders are selected here. But I tried with only one loader too.2 loaders are selected here. But I tried with only one loader too.

Best answer by AM-adben

Thank you. Setting the boot mode to "Development Boot" fixed the problem and now it's possible to write to the external flash. For STM32N6570-DK, the Dev_boot mode is set when BOOT1 switch position is 1-3, BOOT0 switch position doesn't matter.

As mentioned in the answer you shared:


The Dev_Boot has been designed to open the STM32N6 debug port to external tools for debugging applications and programming/erasing internal or external memory and also to fuse OTP bits (see RM0486 section 5 OTP mapping).

Thank you for your quick assistance.

1 reply

Amel NASRI
Technical Moderator
January 3, 2025

Hi @AM-adben,

The answer from @RomainR. in NUCLEO-N657X0-Q: failed to start GDB server can give you some hints.

For STM32N6570-DK documentation, please refer to https://www.st.com/en/evaluation-tools/stm32n6570-dk.html.

-Amel

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.
AM-adben
AM-adbenAuthorAnswer
Associate II
January 3, 2025

Thank you. Setting the boot mode to "Development Boot" fixed the problem and now it's possible to write to the external flash. For STM32N6570-DK, the Dev_boot mode is set when BOOT1 switch position is 1-3, BOOT0 switch position doesn't matter.

As mentioned in the answer you shared:


The Dev_Boot has been designed to open the STM32N6 debug port to external tools for debugging applications and programming/erasing internal or external memory and also to fuse OTP bits (see RM0486 section 5 OTP mapping).

Thank you for your quick assistance.