cancel
Showing results for 
Search instead for 
Did you mean: 

cannot use pll stm32f103rb

ezrab
Associate II
Posted on April 17, 2011 at 16:01

cannot use pll stm32f103rb

3 REPLIES 3
Posted on May 17, 2011 at 14:31

Perhaps you shouldn't be making presumptions about the initial condition of RCC->CFGR

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
ezrab
Associate II
Posted on May 17, 2011 at 14:31

but isnt this line disable all assumation?

''

/* Select PLL as system clock source */

    RCC->CFGR = (RCC->CFGR & ~RCC_CFGR_SW) | RCC_CFGR_SW_PLL;

''

Posted on May 17, 2011 at 14:31

Printing out the RCC registers in your two conditions might be instructive to understand how the PLL is running at the different speeds.

This line makes a lot of assumptions

    // Select PREDIV1 as PLL source and sett PLL mul to 3 (set bit 0)

    // for 8*3 = 24 MHz

    RCC->CFGR |= RCC_CFGR_PLLSRC | RCC_CFGR_PLLMULL_0;
Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..