This article has been contributed by Jacob Potter.
The 'H7 has a much more complicated clock tree than any other STM32 family. Part of this is a set of multiplexers, which source kernel clock to groups of peripherals. These multiplexers are fully synchronized to provide a glitch-free transition when switching clocks. This comes with a requirement: while switching peripheral clock source in 'H7, both clocks before and after switch must be present.
The problem is that the glitch-free clock synchronization logic is reset *only* by a power-on reset, and not even by the NRST pin. This can cause some confusing behavior.
In my case, I have a system where the bootloader uses PLL1Q for USB (USBSEL[1:0] = 01) and does not enable PLL3. The main application uses PLL1Q for a different purpose and uses PLL3Q for USB (USBSEL[1:0] = 10). The switch on entry to the main application will work fine since both clocks are enabled.
But if the chip is then reset with NRST, USBSEL changes to its default value of 00, disabling the USB kernel clock. And indeed the kernel clock is disabled, but it's actually "stuck", still switching *away* from the old value of 0b10, waiting for the next edge from PLL3Q which never comes. When the bootloader then changes USBSEL from 0b00 to 0b01 with PLL1Q enabled, the output never starts up (and the USB peripheral therefore doesn't work). This situation is "invisible" - reading back the RCC registers will show the requested value, and doesn't give any indication that the clock mux hasn't switched yet.
My initial fix in my system was to change my Flash bootloader to use PLL3Q for USB just like my application does. But that broke the ability to use BOOT0 and NRST to re-enter the ST DFU bootloader in ROM, since ST's ROM code doesn't ever enable PLL3. If you want to be able to pull BOOT0 and NRST to re-enter the ST DFU ROM (such as with a pushbutton on a development board), you cannot use PLL3 for USB.
I think the fact that both clocks need to be present for a change isn't too surprising, but the fact that this even holds across NRST is very surprising. The reference manual does mention this, e.g. RM0433 section 8.5.10: "For example if pll2_q_ck is selected as kernel clock to the USART1, after system reset, the user has to enable pll2_q_ck to switch back to rcc_pclk2 as kernel clock to USART1". But it's definitely not obvious.