Skip to main content
bnguy.1
Associate III
Mar 10, 2022 3:45 PM UTC
Question

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

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
Mar 11, 2022 3:13 PM UTC

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
Mar 14, 2022 9:00 AM UTC

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