cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with STM32CubeProgrammer version 2.16.0 and STM32G0B1xx USB DFU

CHoog.1
Associate II

Hello, there is a problem with programming STM32G0Bxx/B1xx/C1xx using  STM32CubeProgrammer version 2.16.0 

A have a HEX file starting at address 0x8001800 and with length 0x32800.

When programming this using USB DFU, the tool first starts to erase some of the sectors first.

Which is what i expect. Only the number of sectors and the address go wrong. See part of log of the tool:

"14:38:58 : Size : 202.00 KB
14:38:58 : Address : 0x08001800
14:38:58 : Erasing memory corresponding to segment 0:
14:38:58 : Erasing internal memory sectors [1 51]
14:38:58 : erasing sector 0001 @: 0x08000800 done
14:38:58 : erasing sector 0002 @: 0x08001000 done"

As the sector size is 2K for this MCU type, it should erase sector 3 to 103 (or 102)!

And it should start at address 0x80001800!

Please fix asap.

Something similar was already reported by my colleague.

 

Thanks,

Regards,

Corné

12 REPLIES 12

I've send you a privet message on the Community. Could you please check it.

Best Regards.

STTwo-32

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
Associate III

I am seeing what I think is a similar problem.

STM32CubeProgrammer version 2.16.0

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

If I try to load a large bin file (425kB), then the programmer tries to erase 65364 sectors! When using ST-Link it seems to get past that 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 want to preserve config data at top of flash, so this is not a good workaround.

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

Many thanks, Ben

PS 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
nanor000
Associate

Some other people are seeing a similar issues with version 2.16:
https://groups.io/g/nanovna-users/topic/error_sector_0000_does_not/105259683?dir=asc

I saw the issue myself when using v2.16 to update the firmware of my X-NUCLEO-LPM01A . I didn't work (failed silency) . Switching back to v2.15 solved the issue