cancel
Showing results for 
Search instead for 
Did you mean: 

DFU Problem with STM32L0 73 on chip usb bootloader and STM32cubeProgrammer

feuerwolf
Senior
Posted on March 04, 2018 at 18:27

I can connect a STM32L073 via USB in in DFU mode to STM32CubeProgrammer but i can not programm the uController. 

Reading device Memory and option bytes work, but programming does not.

What I do is:

  1.       Select a Hex file

  2.       Enable verify

  3.       Verbosity level to 3

  4.       Start Programming

Now I got Verification Error and erasing sectors does not work. See end of this post or Please See Output Log file. It shows up like the programm has been updated, but it was not. There is still the old programm starting.

Option Bytes shows that there is no write protection enabled.

It should not be that difficult !?

Please STM team, could someone of your dev team grab a STM32L073 Nucleo board and try to program it via USB DFU and post a step by step solution?

STM32CubeProgrammer Output:

08:06:13 : data: 210000f81f

08:06:13 : Memory Programming ...

08:06:13 : Openeing and parsing file: C:\Users\Alexander Wolf\Documents\PROJEKTE\210 EOS\2 PROGRAMMING\eos 009 - 5\Debug\EOS_009_5.hex

08:06:13 :   File          : C:\Users\Alexander Wolf\Documents\PROJEKTE\210 EOS\2 PROGRAMMING\eos 009 - 5\Debug\EOS_009_5.hex

08:06:13 :   Size          : 66748 Bytes

08:06:13 :   Address       : 0x08000000

08:06:13 : Erasing Segment <0> Address <0x08000000> Size <66748>Bytes

08:06:13 : Erasing memory corresponding to segment 0:

08:06:13 : Erasing internal memory sectors [0 521]

08:06:13 : sector 0000 does not exist

08:06:13 : sector 0001 does not exist

08:06:13 : sector 0002 does not exist

08:06:13 : sector 0003 does not exist

.....

08:06:13 : sector 0520 does not exist

08:06:13 : sector 0521 does not exist

08:06:13 : erase: 0003ms

08:06:13 : Download in Progress:

08:06:13 : data: 2100000008

08:06:13 : data: 005000208dc30008ddc30008ddc

....

08:06:14 : File download complete

08:06:14 : Time elapsed during the download operation is: 00:00:00.177

08:06:14 : VERIFYING ...

08:06:14 : data: 2100000008

08:06:14 : data: 0050002029c3000879

...

08:06:14 : Error: Verification issue at address  0x08000004 (byte = 0x29)

08:06:14 : Error: Download verification failed
1 ACCEPTED SOLUTION

Accepted Solutions
feuerwolf
Senior
Posted on March 08, 2018 at 12:33

Dear Aymen,

sadly Full Chip erase is NOT supported for L0 and L1 devices using Bootloader interface! Thats why its not possible to programm the device. The developers for STM32cubeProgrammer forget to include a Button which selects all Sector Index checkboxes to be able to do use the singe sector erase for all sectors.

0690X00000604SDQAY.jpg

in order to do a full chip erase the only working workauround L0 L1 devices is to select and then deselct the Read out Protection Flag, which will do a chip erase after deselect ROP flag. Performing that procedre it is possible to Programm L0 L1 devices via USB

Please see attached PDF

________________

Attachments :

Programming via USB DFU on L0 devices .pdf : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HxlM&d=%2Fa%2F0X0000000b23%2Fk5aBYIerrH6vpWtem7teHLHaZI2iLKxP4v.BMZ5LfzM&asPdf=false

View solution in original post

4 REPLIES 4
Aymen Abderrahmen_
Associate II
Posted on March 08, 2018 at 10:00

Hi Alexander,

Please try to do a mass erase before launching hex programming.

Best regards,

Aymen.

feuerwolf
Senior
Posted on March 08, 2018 at 12:33

Dear Aymen,

sadly Full Chip erase is NOT supported for L0 and L1 devices using Bootloader interface! Thats why its not possible to programm the device. The developers for STM32cubeProgrammer forget to include a Button which selects all Sector Index checkboxes to be able to do use the singe sector erase for all sectors.

0690X00000604SDQAY.jpg

in order to do a full chip erase the only working workauround L0 L1 devices is to select and then deselct the Read out Protection Flag, which will do a chip erase after deselect ROP flag. Performing that procedre it is possible to Programm L0 L1 devices via USB

Please see attached PDF

________________

Attachments :

Programming via USB DFU on L0 devices .pdf : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HxlM&d=%2Fa%2F0X0000000b23%2Fk5aBYIerrH6vpWtem7teHLHaZI2iLKxP4v.BMZ5LfzM&asPdf=false
Amel NASRI
ST Employee

Hello,

Please note that the reported issue should be already fixed with last version of STM32CubeProgrammer (1.2.0).

-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.

i'm still having this issue, on STM32CubeProgrammer 2.5.0 on macOS and Windows. Cannot program a STM32L151 via DFU. If there is a known solution, please let me know - I'm about to switch to tinyusb, which afaik allows to simply drop a firmware file on the mass storage and reboot