STM32H723 with inverting VBUS detector, ROM DFU bootloader compatibility
Hello,
We are designing a self-powered board using an STM32H723 that uses USB_OTG_HS peripheral. I would like to use the ROM USB DFU bootloader for flashing.
AN4879’s VBUS sensing section describes a inverting mosfet-based detector whose output is low when VBUS is present. Our EE engineer used this design for PA9 pin of the MCU.
I have 2 broad questions about it:
For my application firmware, my understanding is that I should:
- Disable the dedicated USB VBUS detector (
GCCFG.VBDEN = 0, corresponding to HAL’svbus_sensing_enable = DISABLE). - Configure PA9 as a normal GPIO input or EXTI input and interpret it as active-low.
-
When pin changes state, call
USBD_Start()/USBD_Stop()
Is my understanding of AN4879 correct about steps needed from firmware to handle this hardware setup?
For DFU ROM Bootloader,
- Does the STM32H723 factory ROM USB DFU bootloader use PA9 for VBUS detection, or does it operate independently of that input? The AN2606 appnote mentions “USB cable detected” check (Fig 79), but never explains how it is performed. No requirements for PA9 are mentioned for H723 (table 145), but it is mentioned for F105/107 family as used for VUSB sensing.
- Will ROM DFU work with the inverted VBUS signal connected to PA9, including when entering system-memory boot mode directly after reset?
- If this circuit is incompatible with ROM DFU, what VBUS detection circuit does ST recommend for a self-powered design that must support both application USB and ROM DFU?
Thank you.
