cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F072R8 does not enter into DFU mode

ab_nurd
Associate II

Hello,

I have custom board with STM32F072R8 and a USB interface to it. STM's USB is connected to USB of a x86 Board. STM as acting as USB device and x86 Board as USB host. When the board is powered up, I can see that STM is listed in the output of "lsusb" command. I can also send commands over USB to STM and receive responses from STM.

The software on STM is implemented in such a way that when it receives USB command for "start software update", it jumps to system memory bootloader of ST. Then it shall appear as DFU device on x86 Board. The problem is that it jumps to system bootloader but does not appear as DFU device.

Also, the flashing and debugging over SWD interface does not really work. The code flashed during debugging works only when the board is powered off and then on.

Could you please suggest me any solution to this?

Thanks

2 REPLIES 2
TDK
Guru

Might want to insert a pause after disabling USB, but before jumping to the bootloader so the system can process the change in USB devices. Ensure you're jumping correctly and not disabling interrupts.

> The code flashed during debugging works only when the board is powered off and then on.

Why? What happens when you debug it and step through? "does not really work" is vague.

If you feel a post has answered your question, please click "Accept as Solution".
ab_nurd
Associate II

When I flash and debug code, the code runs, I can step debug the code but the board is not detected as USB device on the host. Therefore I cannot send any commands over USB from host. It seems that USB is detected only on powerup of the board. But after powered-up if code is flashed and debugged or if STM tries to enter DFU mode, it does not somehow comes up as USB (as HID or DFU) device.

I am using standard peripheral library (due to historical reasons) along with STM32 USB device library (v1.0.1). I could not find a function to stop/disable USB.