cancel
Showing results for 
Search instead for 
Did you mean: 

DFU DFUSE problem with STM32L0 (STM32L072KB)

Posted on February 07, 2017 at 10:44

Hello,

we are developed products based on STM F0 (F072RB) and F4 (F405VG) Series. We use the DFUSe Bootloader to program our devices using USB. Every thing works as expected, great job and thanks to ST for this solution.

The problem:

Now we implementing a new product base on the STM32L072KB (128k Flash).

I set the device to DFU mode, it enummerates on USB as expected and it gets listed in the Dfuse Demo (v3.0.5).

The Dfuse Demo lists 1536 sectors (128 b per sector) for the controller.

I wase a bit confused as the device had only 128k flash so the demo should list 1024 sectors. I tried to readback the device memory an it seems that the application fails. The dfu files read from the controller is just 1K, it seems that the erase function didn't work and the leave DFU command also seem to fail.

I also tried my own c♯ libs to read from the device. These libs work perfectly on the F0 and F4 with a r/w blocksize of 256 byte but if i try to read i only get 0 values.

*I did some testing and changed blocksize to 128 byte, now i'm able to read the first sectors, but write and mass erase still fail

Is there a 

workaround or did i missed someting?

Thanks a lot.

#dfu #stm32l0 #dfuse
1 ACCEPTED SOLUTION

Accepted Solutions
Posted on February 07, 2017 at 17:07

I finally found and fixed the problem

http://www.linguee.de/englisch-deutsch/uebersetzung/respectively.html

 found a workaround:

It seems that sector count causes the problem.

I assumed 1024 sectors (instead of 

1536) for my 128k version (

STM32L072KB) and use a blocksize of 128 byte.

Read, write and sector erase are working from my own libraries.

DfuSe Demo fails on any action for this target.

I suspect that this is caused by the wrong sector count transmitted by the bootloader for my L0 version (1536=192k Flash, should be 1024=128k Flash).

View solution in original post

1 REPLY 1
Posted on February 07, 2017 at 17:07

I finally found and fixed the problem

http://www.linguee.de/englisch-deutsch/uebersetzung/respectively.html

 found a workaround:

It seems that sector count causes the problem.

I assumed 1024 sectors (instead of 

1536) for my 128k version (

STM32L072KB) and use a blocksize of 128 byte.

Read, write and sector erase are working from my own libraries.

DfuSe Demo fails on any action for this target.

I suspect that this is caused by the wrong sector count transmitted by the bootloader for my L0 version (1536=192k Flash, should be 1024=128k Flash).