cancel
Showing results for 
Search instead for 
Did you mean: 

Fails to program after DFU

JJust.2
Associate II

I have been working with a custom board using the STM32U073 for while, and have made a program that can active the USB system memory DFU. After this I suddenly cannot program the board anymore using the STM32CubeProgrammer.

I can read all the flash memory, but cannot program the flash anymore.

...
Debugger connected
Waiting for debugger connection...
vchg_ctrl_run (duration_ms=16174368) at xxx/vchg_ctrl.c:108
108	    setVchg(vchg_state); // Set the charger state based on the conditions
connected to remote target localhost:61234
Note: automatically using hardware breakpoints for read-only addresses.
load "xxx/build/Debug/hp2_charger_stm32_new.elf" 
Loading section .isr_vector, size 0xc0 lma 0x8000000
Loading section .text, size 0x10318 lma 0x80000c0
Loading section .rodata, size 0x754 lma 0x80103d8
Loading section .ARM, size 0x8 lma 0x8010b2c
Loading section .init_array, size 0x4 lma 0x8010b34
Loading section .fini_array, size 0x4 lma 0x8010b38
Loading section .data, size 0x138 lma 0x8010b3c
      -------------------------------------------------------------------
                       STM32CubeProgrammer v2.20.0                  
      -------------------------------------------------------------------
3

Log output file:   C:\Users\jju\AppData\Local\Temp\STM32CubeProgrammer_a21944.log
ST-LINK SN  : 066CFF535149756687104533
ST-LINK FW  : V2J46M32
Board       : NUCLEO-F070RB
Voltage     : 3.26V
SWD freq    : 4000 KHz
Connect mode: Under Reset
Reset mode  : Hardware reset
Device ID   : 0x489
Revision ID : Rev A
Device name : STM32U0xx
Flash size  : 256 KBytes (default)
Device type : MCU
Device CPU  : Cortex-M0+
BL Version  : 0xD0
Debug in Low Power mode enabled
3

Opening and parsing file: ST-LINK_GDB_server_a21944.srec
2

Memory Programming ...
  File          : ST-LINK_GDB_server_a21944.srec
  Size          : 67.11 KB 
  Address       : 0x08000000
2

Erasing memory corresponding to segment 0:
Erasing internal memory sectors [0 33]
Download in Progress:
2

Error: failed to download  Sector[0]
Error: failed to download the File
Encountered Error when opening C:/Users/jju/AppData/Local/stm32cube/bundles/programmer/2.20.0/bin\STM32_Programmer_CLI.exe
Error in STM32CubeProgrammer
Error finishing flash operation
cube is killed by signal SIGTERM

 

3 REPLIES 3
Kouthair
ST Employee

Hello JJust.2,


I would suggest trying this with the standalone version of STM32CubeProgrammer in Under Reset mode.
Could you also attach a dump of the Option Bytes?

Best regards
Kouthair

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.
Kouthair
ST Employee

Hey there JJust.2!
Any updates?
Kouthair

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.
JJust.2
Associate II

Yes I "fixed" it.

Apparently this error is output when the image is too large.

So I build with optimizer and then it works.

Maybe some feedback to the ST team, would be to make better error descriptions, it took me several days of trial and error before I found the problem.  :)

BR,

Jakob