2021-07-02 04:31 PM
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?
2021-07-19 08:24 PM
2021-07-19 08:27 PM
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.
2021-07-20 04:30 PM
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