cancel
Showing results for 
Search instead for 
Did you mean: 

Using over 128K or 256K FLASH on STM32G0B1KC results in "failed to download sector[0]"

SSpen
Associate II

I've been fighting this really frustrating issue and have tried everything that can humanly be found on the internet (including STM32CubeIDE downgrades and upgrades on multiple machines).

Simply put, whenever the program size is 64 or more sectors, flashing it results in the following error message and incorrect behavior:

Erasing internal memory sectors [0 64]

Download in Progress:

Error: failed to download Segment[0]

Error: failed to download the File

Erasing internal memory sectors [0 64]
Download in Progress:
 
 
Error: failed to download Segment[0]
Error: failed to download the File

I found it interesting that dat sheet for this device family (https://www.st.com/resource/en/reference_manual/rm0444-stm32g0x1-advanced-armbased-32bit-mcus-stmicroelectronics.pdf) indicates that the Flash bank is only 64 pages of 2KB memory (128K) with the 256K variant being a dual-bank device. Can someone help me out here because 128K is absolutely not enough on a 256K micro.

1 REPLY 1
Amel NASRI
ST Employee

Hi @SSpen​ ,

Sorry to come back late to this question.

It is interesting to understand the current status of your issue.

If it is still being faced, could you please try to use STM32CubeProgrammer on standalone:

  • perform an STLink Firmware upgrade
  • try to erase the flash memory first, is same message "Erasing internal memory sectors [0 64]"?
  • try to program your device, do you still see same error?

-Amel

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.