STM32 gotchas
156. USB and PG2..PG15 don't work on some STM32 - they have a dedicated power pin and an isolation switch

In the 'L4, 'L5 and 'U5 families, USB module has its own dedicated power pin, VDDUSB. In the larger packages with PG2..PG15 pins, they also have a dedicated power pin, VDDIO2.

Both VDDUSB and VDDIO2 are isolated from the rest of the system, both electrically and logically, by dedicated switches. These switches are controlled by USV and IOSV bits in PWR_CR2 register (or, in case of 'U5, USV and IO2SV bits in PWR_SVMCR register) and are off by default. As a surprising consequence, USB and PG2..PG15 don't work, until these bits are set.

Note, that dedicated VDDUSB and VDDIO2 pins exist also in some other STM32 models, but there they don't have the isolation switch. The isolation switch is probably needed for the low-power STM32 families due to technological reasons, to prevent unwanted leakages with vastly different voltages on VDD and the dedicated power pins.