Skip to main content
RoKsPy
Associate II
August 11, 2021
Solved

Hello! I'm using STM32L422 and I'm having trouble with setting up the PLL above certain frequencies. Are there any specific configuration requirements when setting up PLL at high frequencies?

I use 8MHz crystal as the input for the PLL. I'm using a timer and a LED to verify frequency, aka the LED should blink at 1Hz. Everything works fine until 48MHz, after which the STM seems to fail - led doesn't blink and the debugger does not know where is the program counter. The register values indicate that yes, the frequency should be 80MHz, just before it is enabled. And also if I increase the PLLR (output prescaler) to divide to 40MHz, then everything starts to work again.. I also have tried using the HSI16 as input and the same result.

    This topic has been closed for replies.
    Tesla DeLorean
    Tesla DeLoreanBest answer
    Guru
    August 11, 2021

    The VCO has a maximum frequency. Not looking to pull the Reference Manual, but would expect somewhere a little north of 160 MHz, probably has a lower limit too.

    Watch the wait states on flash, and that they are sufficiently large to accommodate operational speed.

    Watch also APB1 / APB2 ratios don't exceed data sheet limits.

    Should be code examples in Cube L4 where chips are correctly configured for 80 MHz operation, review those..

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..

    3 replies

    Tesla DeLorean
    Tesla DeLoreanBest answer
    Guru
    August 11, 2021

    The VCO has a maximum frequency. Not looking to pull the Reference Manual, but would expect somewhere a little north of 160 MHz, probably has a lower limit too.

    Watch the wait states on flash, and that they are sufficiently large to accommodate operational speed.

    Watch also APB1 / APB2 ratios don't exceed data sheet limits.

    Should be code examples in Cube L4 where chips are correctly configured for 80 MHz operation, review those..

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    RoKsPy
    RoKsPyAuthor
    Associate II
    August 11, 2021

    The Flash wait states probably are the answer, will verify and reply again. Thanks for the answer

    RoKsPy
    RoKsPyAuthor
    Associate II
    August 11, 2021

    The flash wait states were the issue. Works now. Thanks!