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
Joe WILLIAMS
ST Employee

Hi CHoog.1

This post has been escalated to the ST Online Support Team for additional assistance.  We'll contact you directly.

Kind Regards

Joe WILLIAMS

STMicro Support

STTwo-32
ST Employee

Hello @CHoog.1 

Sorry for the late replay. I'm not able to reproduce this behavior on my side (with both GUI and CLI):

STTwo32_0-1714113431878.png

Could you please share your .hex file and your device ID so that we can test 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.

PeterMeldgaard
Associate

Bumb, We see the same problem with our firmware...

 

Lets get a fix quickly please..

Can you give more details and share your .hex file and the MCU that you are using.

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.

CHoog.1
Associate II

STM32G0B1KC is the exact type of the MCU i am using.

When programming a hex file, not starting at 0x8000000 you immediately see the problem with the erases send before the actual programming starts.

Also when just easing individual sectors, you see an error in the calculation of the 'Progam Counter' as the value is called. The value send with the FDU_DOWNLOAD command with wValue = 0 is calculated wrong.

And maybe there is something wrong with the size of the sector. The flash sector size of this MCU is just 2Kbyte.

Not the 4K as shown on that Erase & Programming menu.

 

 

CHoog.1
Associate II
18:07:45 : Device ID   : 0x0467
  18:07:45 : UPLOADING OPTION BYTES DATA ...
  18:07:45 :   Bank          : 0x00
  18:07:45 :   Address       : 0x1fff7800
  18:07:45 :   Size          : 68 Bytes
  18:07:45 :   Bank          : 0x01
  18:07:45 :   Address       : 0x1fff7870
  18:07:45 :   Size          : 4 Bytes
  18:07:45 : UPLOADING ...
  18:07:45 :   Size          : 1024 Bytes
  18:07:45 :   Address       : 0x8000000
  18:07:45 : Read progress:
  18:07:45 : Data read successfully
  18:07:45 : Time elapsed during the read operation is: 00:00:00.003
  18:10:54 : Memory Programming ...
  18:10:54 : Opening and parsing file: DP_FX7_Debug_enc.hex
  18:10:54 :   File          : DP_FX7_Debug_enc.hex
  18:10:54 :   Size          : 200.00 KB 
  18:10:54 :   Address       : 0x08002000 
  18:10:54 : Erasing memory corresponding to segment 0:
  18:10:54 : Erasing internal memory sectors [2 51]
  18:10:54 : erasing sector 0002 @: 0x08001000 done
  18:10:54 : erasing sector 0003 @: 0x08001800 done
  18:10:54 : erasing sector 0004 @: 0x08002000 done
  18:10:54 : erasing sector 0005 @: 0x08002800 done
  18:10:54 : erasing sector 0006 @: 0x08003000 done
  18:10:54 : erasing sector 0007 @: 0x08003800 done
  18:10:54 : erasing sector 0008 @: 0x08004000 done
  18:10:54 : erasing sector 0009 @: 0x08004800 done
  18:10:54 : erasing sector 0010 @: 0x08005000 done
  18:10:54 : erasing sector 0011 @: 0x08005800 done
  18:10:54 : erasing sector 0012 @: 0x08006000 done
  18:10:54 : erasing sector 0013 @: 0x08006800 done
  18:10:54 : erasing sector 0014 @: 0x08007000 done
  18:10:54 : erasing sector 0015 @: 0x08007800 done
  18:10:54 : erasing sector 0016 @: 0x08008000 done
  18:10:54 : erasing sector 0017 @: 0x08008800 done
  18:10:54 : erasing sector 0018 @: 0x08009000 done
  18:10:54 : erasing sector 0019 @: 0x08009800 done
  18:10:54 : erasing sector 0020 @: 0x0800a000 done
  18:10:54 : erasing sector 0021 @: 0x0800a800 done
  18:10:54 : erasing sector 0022 @: 0x0800b000 done
  18:10:54 : erasing sector 0023 @: 0x0800b800 done
  18:10:54 : erasing sector 0024 @: 0x0800c000 done
  18:10:54 : erasing sector 0025 @: 0x0800c800 done
  18:10:54 : erasing sector 0026 @: 0x0800d000 done
  18:10:54 : erasing sector 0027 @: 0x0800d800 done
  18:10:54 : erasing sector 0028 @: 0x0800e000 done
  18:10:54 : erasing sector 0029 @: 0x0800e800 done
  18:10:54 : erasing sector 0030 @: 0x0800f000 done
  18:10:54 : erasing sector 0031 @: 0x0800f800 done
CHoog.1
Associate II
  18:10:54 : erasing sector 0032 @: 0x08010000 done
  18:10:54 : erasing sector 0033 @: 0x08010800 done
  18:10:54 : erasing sector 0034 @: 0x08011000 done
  18:10:54 : erasing sector 0035 @: 0x08011800 done
  18:10:55 : erasing sector 0036 @: 0x08012000 done
  18:10:55 : erasing sector 0037 @: 0x08012800 done
  18:10:55 : erasing sector 0038 @: 0x08013000 done
  18:10:55 : erasing sector 0039 @: 0x08013800 done
  18:10:55 : erasing sector 0040 @: 0x08014000 done
  18:10:55 : erasing sector 0041 @: 0x08014800 done
  18:10:55 : erasing sector 0042 @: 0x08015000 done
  18:10:55 : erasing sector 0043 @: 0x08015800 done
  18:10:55 : erasing sector 0044 @: 0x08016000 done
  18:10:55 : erasing sector 0045 @: 0x08016800 done
  18:10:55 : erasing sector 0046 @: 0x08017000 done
  18:10:55 : erasing sector 0047 @: 0x08017800 done
  18:10:55 : erasing sector 0048 @: 0x08018000 done
  18:10:55 : erasing sector 0049 @: 0x08018800 done
  18:10:55 : erasing sector 0050 @: 0x08019000 done
  18:10:55 : erasing sector 0051 @: 0x08019800 done
  18:10:55 : Download in Progress:
  18:10:57 : File download complete

 

As you can see the start address of the erase is wrong. Also the end address and the nr of sectors erased is wrong.

The data in the hex file ends at 0x8034000 (not at 801A000)

 

Hello @CHoog.1 

Could you please share your .hex file.

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.

Please send me an email or something i can send the hex file to? (something more private)