cancel
Showing results for 
Search instead for 
Did you mean: 

How to erase EEPROM in an STM32L0-series part USING STM32CubeProgrammer?

DNick.1
Associate II

The release notes for v2.2.0 say that feature is in there, but I can't seem to find it.

I tried the "Full Chip Erase" feature & it cleared everything EXCEPT the EEPROM.

17 REPLIES 17

Thanks, @Maryem .

Jan

Hi all,

 

I have problem erasing the EEPROM from the command line. My command is:

"STM32_Programmer_CLI.exe -c port=SWD mode=UR --erase ed1"

And I get that error:

"Error: You are performing erase operation but you are missing to indicate the sectors you want to erase, Please refer to the help for more details on the Erase command parametres"

The version is STM32CubeProgrammer v2.16.0, v2.17.0.

 

 

Any idea how to make the CLI working?

 

Best regards,

Martin Peevski

Hello @Marcuka,

 

Could you please specify which target you are working with?

 

Maryem.


In order 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.

Hello Maryem,

STM32L071CB.

Marcuka_0-1723547682940.png

Best regards,

Martin Peevski

Hello @Marcuka ,

 

Thank you for your feedback. This issue has already been raised to the dev team to resolve it.

Internal ticket number: 186569 (This is an internal tracking number and is not accessible or usable by customers)

In the meantime, you can try using the GUI of version 2.17.0 or the CLI of version 2.15.0, and I will keep you updated about any progress. Thank you for your understanding !

 

Maryem.


In order 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.

Hello @Marcuka ,

 

The problem has been resolved in STM32CubeProgrammer v2.18.0

You can download it from this Link.

 

Maryem.


In order 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.

Hello @Maryem ,

Thank you, I'll try it.

 

Best regards,

Martin

This does not appear to work with STM32L051 for erasing EEPROM: the command times out after several seconds as shown below and the EEPROM is not erased.  Note that the --erase all command also times out although you can erase a range of sectors e.g. --erase [5 10]

"c:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin\STM32_Programmer_CLI.exe" -c port=COM5 --erase ed1
      -------------------------------------------------------------------
                       STM32CubeProgrammer v2.21.0
      -------------------------------------------------------------------

Serial Port COM5 is successfully opened.
Port configuration: parity = even, baudrate = 115200, data-bit = 8,                     stop-bit = 1.0, flow-control = off
Activating device: OK
Board       : --
Chip ID: 0x417
BootLoader protocol version: 3.1
Device name : STM32L05x/L06x/L010
Flash size  : 64 KBytes (default)
Device type : MCU
Revision ID : --
Device CPU  : Cortex-M0+
Erase sector(s) ...
Error: Timeout error occured while waiting for acknowledgement.
Flash page/sector erase command correctly executed.
Note: if flash sector is protected, it will not be erased.

What you can do however is use the --fillmemory command to overwrite with 00.  For example:

"c:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin\STM32_Programmer_CLI.exe" -c port=COM5 --fillmemory 0x08080000 size=32 pattern=0
      -------------------------------------------------------------------
                       STM32CubeProgrammer v2.21.0
      -------------------------------------------------------------------

Serial Port COM5 is successfully opened.
Port configuration: parity = even, baudrate = 115200, data-bit = 8,                     stop-bit = 1.0, flow-control = off
Activating device: OK
Board       : --
Chip ID: 0x417
BootLoader protocol version: 3.1
Device name : STM32L05x/L06x/L010
Flash size  : 64 KBytes (default)
Device type : MCU
Revision ID : --
Device CPU  : Cortex-M0+

Response received from device: NACK


Error: Address not acknowledged: 0x1FF8007C
The used filling data size is 8 bits.
Filling memory operation:
  Start address           : 0x08080000
  Size(Bytes)             : 0x00000032
  Data value              : 0x00000000
  Filling data size(Bytes): 8 bits


Not flash Memory : No erase done
██████████████████████████████████████████████████ 100%

The filling memory operation achieved successfully

This does in fact set the specified memory locations to 0