2018-03-04 09:27 AM
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:
Select a Hex file
Enable verify
Verbosity level to 3
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.hex08:06:13 : File : C:\Users\Alexander Wolf\Documents\PROJEKTE\210 EOS\2 PROGRAMMING\eos 009 - 5\Debug\EOS_009_5.hex08:06:13 : Size : 66748 Bytes08:06:13 : Address : 0x08000000 08:06:13 : Erasing Segment <0> Address <0x08000000> Size <66748>Bytes08:06:13 : Erasing memory corresponding to segment 0:08:06:13 : Erasing internal memory sectors [0 521]08:06:13 : sector 0000 does not exist08:06:13 : sector 0001 does not exist08:06:13 : sector 0002 does not exist08:06:13 : sector 0003 does not exist.....
08:06:13 : sector 0520 does not exist
08:06:13 : sector 0521 does not exist08:06:13 : erase: 0003ms08:06:13 : Download in Progress:08:06:13 : data: 210000000808:06:13 : data: 005000208dc30008ddc30008ddc....
08:06:14 : File download complete
08:06:14 : Time elapsed during the download operation is: 00:00:00.17708:06:14 : VERIFYING ...08:06:14 : data: 210000000808:06:14 : data: 0050002029c3000879...
08:06:14 : Error: Verification issue at address 0x08000004 (byte = 0x29)
08:06:14 : Error: Download verification failedSolved! Go to Solution.
2018-03-08 03:33 AM
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.
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=false2018-03-08 01:00 AM
Hi Alexander,
Please try to do a mass erase before launching hex programming.
Best regards,
Aymen.
2018-03-08 03:33 AM
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.
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=false2018-09-12 02:50 AM
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.
2020-12-20 02:13 PM
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