STM32 gotchas
157. In 'U5, ADC calibration hangs, if VDDA isolation is not removed

In the low-power STM32, there are several auxiliary power domains,which are isolated from the common VDD domain both logically and electrically through dedicated isolation switches, presumably to reduce leakage when those domains are not in use.

The 'U5 family took this to the next level: even the VDDA power domain has an isolation switch, which has to be switched on, whenever any analog facility is to be used. It is controlled by the PWR_SVMCR.ASV bit.

If this bit is not on i.e. the switch is off, as it is by default, the analog facilities don't work properly. For example when trying to use the ADC, the first step is to perform a calibration. As user ASimo.3 found out, if the isolation switch is off, this calibration will never finish, and naively written loop waiting for calibration to end will hang forever.