Skip to main content
BenMack99
Associate III
May 23, 2024
Solved

Problem with V2.16.0 and STM32G0B0, Erasing Too Many Sectors

  • May 23, 2024
  • 2 replies
  • 3205 views

STM32CubeProgrammer version 2.16.0

Target STM32G0B0RET6, device ID 0x467, Rev Z, 512KB flash, bootloader 0xD0

When loading a large bin file (425kB), the programmer tries to erase 65364 sectors! There's only 256 sectors in target, and the image only needs 212 sectors erased.

When using an ST-Link SWD interface it gets past this (albeit erasing entire flash) and programs the flash OK, but when using USB it just locks up.

It doesn't happen with smaller files that will fit in bank 1, just larger files that require 2 banks.

If I do a full chip erase first, then tick "skip flash erase before prog" then it avoids this problem. However I need to preserve config data at top of flash, so this is not a good workaround.

I think it's a similar problem to this post so I replied to that, then thought I should start a separate thread.

Here's some basic logs in case it helps. Via ST-Link:-

 

15:32:16 : File : wf3835-tank-combined.bin
15:32:16 : Size : 425.17 KB
15:32:16 : Address : 0x08000000
15:32:16 : Erasing memory corresponding to segment 0:
15:32:16 : Erasing internal memory sectors [0 65364]
15:32:20 : Download in Progress:
15:32:25 : File download complete

 

Via USB:-

 

12:14:06 : File : wf3835-tank-combined.bin
12:14:06 : Size : 425.17 KB
12:14:06 : Address : 0x08000000
12:14:06 : Erasing memory corresponding to segment 0:
12:14:06 : Erasing internal memory sectors [0 65364]
12:14:06 : erasing sector 0000 @: 0x08000000 done
...
12:14:12 : erasing sector 0255 @: 0x0807f800 done
12:14:12 : sector 0256 does not exist
etc until it locks up

 

Happy to post more info, logs etc, here, just ask. I can send you the bin file privately, pm me

Many thanks, Ben

Best answer by BenMack99

V2.17.0 is out and they appear to have fixed this problem.

Brief aside, I tried using the app's updater, and got the error message "the updater package on the server is corrupted", so I installed it manually...

2 replies

STTwo-32
Technical Moderator
May 23, 2024

Hello @BenMack99 

Can you share your.bin file.

Best Regards.

STTwo-32 

BenMack99
BenMack99Author
Associate III
May 23, 2024

@STTwo-32thanks for your quick reply, I have messaged it to you privately, please treat as confidential

BenMack99
BenMack99Author
Associate III
May 31, 2024

@STTwo-32 any news on this? Thanks, Ben

Amine_Jridi
Technical Moderator
June 11, 2024

Hello @BenMack99,

Regarding this issue related to sectors in bank 2, we are aware of it and it's currently under investigation by our development team.

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

I'll keep you updated.

Thanks,

Amine.

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.
BenMack99
BenMack99Author
Associate III
June 11, 2024

Thanks for the update Amine, much appreciated