Skip to main content
bnguy.1
Associate III
March 10, 2022
Question

How to limit STM32CubeProgrammer to only erase sectors that are used in the program.

  • March 10, 2022
  • 2 replies
  • 856 views

I'm using the last 2 sectors in Flash for storing user data, but when I reprogram the firmware via STM32CubeProgrammer (uart) it automatically erases those sectors too.

If I download the firmware via CubeIDE (jtag/swd port), the calibration sectors do not get erased.

Is there a way to to configure the CubeProgrammer to only erase the first few sectors before programming?

This topic has been closed for replies.

2 replies

TDK
Super User
March 11, 2022

The behavior of STM32CubeProgrammer's UART mode isn't very well defined. I would try using the command line to see if you get different results.

"If you feel a post has answered your question, please click ""Accept as Solution""."
Houda GHABRI
ST Employee
March 14, 2022

Hi @bnguy.1​ ,

Similar issue is fixed in last CubePRogrammer version 2.10.0, can you try please and tell me if it is OK?

Houda