cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H743 DFU Entry doesn't work unless BOOT0 held high at power-on

MKenn.1
Associate III

I'm having trouble entering the DFU bootloader on my H743 (rev V).

power on (with BOOT0 high) -> USB DFU functions as expected

power on (with BOOT0 low) -> application functions as expected

reset (with BOOT0 low) -> application functions as expected

reset (with BOOT0 high) -> DFU bootloader doesn't work

jump from application to DFU -> DFU bootloader doesn't work

I've tested this behavior both on a custom board (H743ZI rev V), and on a Nucleo-H743ZI2 with the same results. If I break in to the debugger in either of the not-working scenarios, I can see the program counter is in the bootloader's code somewhere, so it *is* jumping in, but USB doesn't work.

Jumping from application to bootloader works fine with the same application running on various F4 and F7 devices, but doesn't work on the H7.

 What's going on? Why can't I enter the bootloader except at power-on?

12 REPLIES 12
In your jump to DFU, try resetting the usb peripheral with the RCC reset bit, waiting 500ms, then doing the jump. The PC could be ignoring it due to the device changing behavior, or thinking it’s still the old device.
If you feel a post has answered your question, please click "Accept as Solution".
MKenn.1
Associate III

This test was done on an H743ZI2 Nucleo with the st-link USB connected, let the reset-to-DFU happen, then connect the other USB connector after the reset. PC never sees the device until the system ROM is running.

MKenn.1
Associate III

The plot thickens again. Something is clearly leaking across a reset, because I now have a solution to the problem that's pretty weird. Setting the relevant bits in AHB1RSTR doesn't help, still doesn't work. However, before the reset, clearing the USB peripheral enable bits in AHB1ENR DOES make it work after the reset. No delay or anything, just turn off the power, leave our breadcrumb, then hit NVIC_SystemReset().

This is all of the change required to make it work: https://github.com/rusefi/rusefi/pull/2999/files