Skip to main content
EKirs.1
Associate
December 23, 2024
Solved

STM32N6570-DK: Cannot erase external Flash

  • December 23, 2024
  • 2 replies
  • 1451 views

Hello,

I have received the new STM32N6570-DK board a week ago. It successfully runs the "out-of-box" demo FW programmed into the external Flash and I am also able to load and run some simpler examples from SRAM through the integrated ST-Link debugger. However, when I try going further and would like to run more advanced examples requiring external Flash, I am having issues programming and erasing the external flash in the STM32CubeProgrammer. I do follow the steps in the manual (selecting the proper "external loader" MX66UW1G45G_STM32N6570-DK), however I receive the error "Error: Sector erase operation has failed at least for one of the existing specified sectors.Please verify flash memory protection." when trying to erase first 8 sectors or program another binary into the external Flash. 

Is the external flash locked by some option bytes or OTP? Is there anything that needs to be done to unlock it?

I am using STM32Programmer v2.18.0.

Attached is the screenshot of the error when it happens.

 

Thank you.

Best answer by EKirs.1

Thank you for your response, Maryem.

Indeed, I had two external loaders selected (STM32N6570-DK and the one related to the OTP fuses). After leaving only STM32N6570-DK selected, the Flash can be erased and programmed with success.

Best regards,

Evgeny 

2 replies

Maryem
Technical Moderator
December 25, 2024

Hello @EKirs.1 ,

 

Could you please provide the OTP dump ? Additionally, I noticed from the attached screenshot that there are two external loaders selected. Could you specify which other external loader you are selecting ?

 

Maryem.

EKirs.1
EKirs.1AuthorBest answer
Associate
December 31, 2024

Thank you for your response, Maryem.

Indeed, I had two external loaders selected (STM32N6570-DK and the one related to the OTP fuses). After leaving only STM32N6570-DK selected, the Flash can be erased and programmed with success.

Best regards,

Evgeny