cancel
Showing results for 
Search instead for 
Did you mean: 

Can't erase L010 EEPROM with CubeProgrammer 2.10

Kraal
Senior III

Hi,

I don't remember having this issue with v2.8 of STM32CubeProgrammer, but right now when I try to program a STM32L010 with an elf file that has the EEPROM part filed with values, both the GUI and the CLI fail to erase the EEPROM part of it, aborting and leaving the uC empty (because the flash sector erase did work). The only way to succeed is to perform a mass erase beforehand and then skip sector erase when flashing the elf file.

This becomes a real issue when trying to debug with CubeIDE, because the debug session is started with CubeProgrammer CLI to program the flash before entering debug. The srec temp file generated does not have the EEPROM content by the way, only the flash so it does not mess with the EEPROM content, providing it has been loaded previously by other means (see above).

I know these tools come for free, but the programmer deserves more care as it will steer customers away from working with your products in the long run.

Please, have a look at this issue ASAP and provide a fix for the next release.

Best regards,

Kraal

3 REPLIES 3
Kraal
Senior III

Details:

  • MCU is STM32L010K4
  • In CubeProgrammer, the last sector is correctly displayed as EEPROM, with the correct address, however the size is too big (512 bytes instead of 128).
  • When requesting to erase the EEPROM sector from the GUI, it outputs an error message with failure. However the contents of the EEPROM are effectively gone.
  • When requesting to erase the EEPROM sector from the CLI (-e ed1), it will start to do it, but will spin indefinitely (the led of the ST-Link is alternating red/green) (more than 30 seconds). Pressing ^C will exit the CLI, leaving the ST-Link in an undefined state. After reconnection, the EEPROM is effectively empty.
  • The mass erase command (-e all in CLI) will not erase the EEPROM content.

Side note: the programming time is very slow, i.e. 7 seconds for 8K of flash. SWD freq is 4000Hz. Flashing 28K on a F0 takes usually less than 2 secs if my memory is correct.

Kraal
Senior III

Further investigation

I tried again, but this time with a STM32L010K8.

Surprisingly (for me) this is a completely different beast, as shown by CubeProgrammer:

Device ID   : 0x417
Revision ID : Rev X
Device name : STM32L05x/L06x/L010
Flash size  : 64 KBytes
Device type : MCU
Device CPU  : Cortex-M0+
BL Version  : --

Even if the 010K8 is supposed to have only 256 bytes of EEPROM, you can read back the full 2k that its bigger siblings have, trying to read 1 more byte will fail though. The GUI reports a size of 2k for the EEPROM sector.

Erasing the EEPROM sector is working as it should from the CLI and the GUI.

Programming times are on par with what I'm used to for F0, L4 families (0.7s for 7K flash).

However, debugging with CubeIDE fails to load the EEPROM content (I will open a new question for this), and mass erase does not erase the EEPROM (which can be needed in some situation, for 8-bits ATMEL a fuse indicates if the EEPROM content should be kept or not).

Kraal
Senior III

Back to STM32L010K4.

The info from CubeProgrammer:

Device ID   : 0x457
Revision ID : Rev Z
Device name : STM32L01x/L02x
Flash size  : 16 KBytes
Device type : MCU
Device CPU  : Cortex-M0+
BL Version  : --

Trying to erase the EEPROM sector from the CLI fails after 5 minutes (a time out I presume). The contents are gone however.