Skip to main content
Associate
Nov 4, 2026 4:01 PM UTC
Solved

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’s vbus_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,

  1. 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.
  2. Will ROM DFU work with the inverted VBUS signal connected to PA9, including when entering system-memory boot mode directly after reset?
  3. 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.

FBLBest answer
ST Technical Moderator
Nov 5, 2026 4:14 PM UTC

Hi ​@positron 

STM32H723 ROM USB DFU bootloader does not require VBUS sensing. Its USB DFU interface uses the full-speed data pins PA11/PA12 ; PA9 is not used for bootloader DFU VBUS detect input.

For the application, an active low VBUS detector can be read in firmware as a GPIO if the USB peripheral’s VBUS sensing is disabled OTG_GCCFG.VBDEN = 0. Firmware should treat PA9 low as VBUS present and manage USB connection and disconnection accordingly.

There is a separate concern with using PA9: the internal bootloader may use it as USART1_TX. An external detector that pulls PA9 low could therefore contend with the bootloader driving it high. To avoid that risk, we recommend moving the application’s VBUS detector output to a different GPIO and leaving PA9 free. If PA9 cannot be changed, verify the circuit’s electrical loading and test ROM DFU on the actual board; do not assume the ROM will leave PA9 undriven.

Finally, ensure the ROM DFU USB connection reaches PA11/PA12. If the application uses a different USB pin arrangement or an external PHY, provide appropriate routing or switching for the ROM DFU interface.

 

To give better visibility on the answered topics, please click on "Best answer" on the reply which solved your issue or answered your question.Best regards,FBL

2 replies

FBLBest answer
ST Technical Moderator
Nov 5, 2026 4:14 PM UTC

Hi ​@positron 

STM32H723 ROM USB DFU bootloader does not require VBUS sensing. Its USB DFU interface uses the full-speed data pins PA11/PA12 ; PA9 is not used for bootloader DFU VBUS detect input.

For the application, an active low VBUS detector can be read in firmware as a GPIO if the USB peripheral’s VBUS sensing is disabled OTG_GCCFG.VBDEN = 0. Firmware should treat PA9 low as VBUS present and manage USB connection and disconnection accordingly.

There is a separate concern with using PA9: the internal bootloader may use it as USART1_TX. An external detector that pulls PA9 low could therefore contend with the bootloader driving it high. To avoid that risk, we recommend moving the application’s VBUS detector output to a different GPIO and leaving PA9 free. If PA9 cannot be changed, verify the circuit’s electrical loading and test ROM DFU on the actual board; do not assume the ROM will leave PA9 undriven.

Finally, ensure the ROM DFU USB connection reaches PA11/PA12. If the application uses a different USB pin arrangement or an external PHY, provide appropriate routing or switching for the ROM DFU interface.

 

To give better visibility on the answered topics, please click on "Best answer" on the reply which solved your issue or answered your question.Best regards,FBL
positronAuthor
Associate
Nov 5, 2026 8:28 PM UTC

Thank you! Can you explain then how DFU bootloader detects USB cable?

And more importantly, do I understand correctly that if VUSB is done manually, the thing to do when VBUS is sensed is to call `USBD_Start()`?