0

Designed a custom STM32H723 board and not able to enter USB DFU mode when holding 'boot0' and releasing 'reset', or when holding 'boot0' and powering the board up.

Note that the MCU code does NOT start up normally if the board is booted with the BOOT0 button held (maybe its entering a different dfu mode?)

I'm able to program the board via swd, reset it via the 'reset' button, Zephyr is running on it, ethernet phy is working, gpios are working, serial shell is working. I haven't tried dfu through other means but plan to in the near future.

One thing I picked up on was the mention of "USB cable detected" and I wonder if, even after being careful, I wired the USB connector incorrectly. Do I need to route USB Vbus to a pin so the CPU knows USB is plugged in, for example? (Today USB Vbus is NOT going to the MCU.)

Bootloader flow chart from AN2606 rev 59

usb-c schematic snippet

boot0 and reset buttons

stm32h723 DP/DM

MCU connections

ethernet phy

external adc

Chris Morgan
  • 133
  • 6
  • 1
    It looks like it should work. Maybe the problem is not in these parts of the schematic you show, but in the part you don't show. Post the rest of the circuit. – Justme Sep 01 '23 at 19:28
  • @Justme its a huge schematic, what else could it be? It's not the missing usb vbus connection? – Chris Morgan Sep 02 '23 at 00:25
  • @Justme I also edited the post to reflect that Zephyr is running well on the board, ethernet works, swd programming and debugging, gpio pins, serial shell etc. – Chris Morgan Sep 02 '23 at 01:20
  • It's not the VBUS. But when you go into bootloader mode, about a dozen or two dozen pins are activated as inputs and outputs for different bootloader interfaces. If any one of them is incorrectly connected, it won't work. – Justme Sep 02 '23 at 06:42
  • @Justme AN2606 does say "Configure USB OTG FS Device" but this post on microchip says you can't use otg with type-c, https://microchip.my.site.com/s/article/How-to-do-USB-On-the-go-OTG-on-USB-Type-C. Would you know if there is example wiring for type-c and STM32 usb dfu, I've looked but haven't found any? I wonder if the type-c is causing the issue. – Chris Morgan Sep 02 '23 at 12:36
  • @Justme and what about the USB OTG ID pin? I'm not mapping that anywhere here either, its just floating. – Chris Morgan Sep 02 '23 at 12:59
  • Look, as docs say, the bootoader forces the MCU to be in device mode and OTG pin is irrelevant. Your USB connections is also 100% correct. Like I told you, the problem is not in the parts of the schematics you show. It will be in the parts you don't show, or the hardware has a manufacturing error or something else. For example, if pushing the BOOT button while powering up or resetting the MCU makes it not run the normal application, it meas the MCU does run the bootloader, but it gets stuck handling some other interface accidentally instead of selecting USB DFU mode correctly. – Justme Sep 02 '23 at 13:57
  • @Justme I get ya on the schematics. It's for a proprietary design so I'm finding it tough to share the whole thing without worry of disclosing too much. Added a few more sections to show the full mcu, and the adc that's on the board. Regarding the BOOT0, it DOES get stuck at boot if BOOT0 is held, the application does not start up. What I don't get is how that's possible. Even with noise on NC pins what are the chances it would always be the proper sequence to go into DFU mode? I haven't tried yet but is possible to figure out which DFU via SWD? – Chris Morgan Sep 03 '23 at 01:55

0 Answers0