Skip to main content
ezrab
Associate III
April 17, 2011
Question

cannot use pll stm32f103rb

  • April 17, 2011
  • 3 replies
  • 689 views
Posted on April 17, 2011 at 16:01

cannot use pll stm32f103rb

    This topic has been closed for replies.

    3 replies

    Tesla DeLorean
    Guru
    May 17, 2011
    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 (See Profile) Up vote any posts that you find helpful, it shows what's working..
    ezrab
    ezrabAuthor
    Associate III
    May 17, 2011
    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;

    ''

    Tesla DeLorean
    Guru
    May 17, 2011
    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 (See Profile) Up vote any posts that you find helpful, it shows what's working..