Question
USB VDD issue
We are using the STM32H7R7L8H6H microcontroller in our product design.
During firmware initialization, we observed inconsistent behavior related to the USB voltage detector on different boards that share the same hardware design and firmware.
During firmware initialization, we observed inconsistent behavior related to the USB voltage detector on different boards that share the same hardware design and firmware.
Specifically, the following code auto generated by STM32Cube ide (stm32h7rsxx_hal_msp.c), this causes the MCU to halt on certain boards:
if (HAL_PWREx_EnableUSBVoltageDetector() != HAL_OK)
{
Error_Handler();
}On some boards, the code runs normally, but on others, it enters Error_Handler() immediately after executing this function.
Both boards have identical hardware configuration — USB is not used, and VDD33USB and VDD50USB are tied to 3.3 V.
- Advise whether disabling the USB voltage detector is the recommended workaround when USB is not used.
- Provide any official ST guidance or firmware-level / Hardware level workaround for this behaviour.


- Should we modify the voltage level on the VDDUSB pin, or adjust the mounting status of the 0-ohm resistor instead? please see attached image.
- Should we comment above line permanently, in that case this lines will auto generated when moodifying .ioc file.
@Mehulrana511
@Mehulrana511
Edited to apply source code formatting - please see How to insert source code for future reference.
