STM32F103 stuck in PLL Ready Flag Set Loop forever!
The reference manual for that part from here says

For the register RCC->CR 


  Bit 25 PLLRDY: PLL clock ready flag
  
  Set by hardware to indicate that the PLL is locked.
  
  0: PLL unlocked
  
  1: PLL locked


If you're waiting for the PLL to lock your loop condition should be while((RCC-&gt;CR &amp; RCC_CR_PLL2RDY) == 0) Check the definition of RCC_CR_PLL2RDY, it should be 1 &lt;&lt; 25, but the reference manual for the part you mention doesn't mention a PLL2, so it could just be a naming issue.

At the moment I suspect your PLL is managing to lock before you enter your loop, and then you never leave it.