cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 Leave DFU mode command

Narendra Kulkarni
Associate
Posted on January 23, 2017 at 21:32

Hi, I have a question regarding STM32L Leave DFU mode command. I can enter in to built in bootloader from startup code. I am initialising some GPIO pins in startup (assembly code) and they maintain the status after I push the uC in boot ROM. However, after completion of downloading new firmware, when the application sends Leave DFU mode command, the device comes out successfully but the GPIO registers are are at default state. I understand that application address needs to be provided before sending 0 length packet (leave dfu command).  The documentation (AN3156 page 20) indicates 'the device disconnects itself', but it is unclear if it initializes all peripherals to default state. The GPIO status is maintained while I enter from my startup code to bootrom code.

Can anybody throw some light on how the DFU exit is handled in bootcode or indicate correct steps so that it does not affect the GPIO status. 

2 REPLIES 2
christiantasche9
Associate II
Posted on February 18, 2017 at 07:51

I have a similar problem with a STM32L475RE. I have made a bootloader with the cube mx. I can program the flash. That's working fine.

But it is not possible to use the 'Leave DFU mode' button in the DfuSeDemo Software (v3.0.5).

I always get an error message. And there will be no 'leave DFU mode' command passend to the firmware.

I tried to debug this problem on PC side. But it's seems to be a problem of the dfu libary. Not the direct code of the DfuSeDemo software.

I created a bootloader for a stm32l06 µC. That's working perfect with the DfuSeDemo software incl. leave command. So i used win merge to check differences on firmware created by the cube mx. But i don't find anything. The dfu command codes are the same.

Can anyone from ST check this?

Posted on May 15, 2018 at 16:40

I also have similar problem here with STM32F103ZE. Is there any solution or answer yet?