Showing results for 
Search instead for 
Did you mean: 

Question on the RF-PLL calculations

Associate II


This is a continuation of questions raised in this thread.

In the STM32WL5x microcontrollers, there is a Sub-GHz radio command called "Set_RfFrequency()". The arguments for this function are an Opcode, and RfFreq. However, you don't actually pass your desired RF frequency to this function. Instead, you need to multiply your desired frequency by 1.048576 and pass that value to the function. This is because Set_RfFrequency() takes the argument, multiplies it by 32e6 and divides it by 2^25.

Setting aside how confusing it is to have a function called "Set_RfFrequency()" where you don't actually give it your desired frequency, can someone who understands PLLs explain how this larger number is used to properly set the RF-PLL?

For example, if you want the RF-PLL to be at 868 MHz, you need to pass 910,163,968 to Set_RfFrequency(). How is this value used? Does the microcontroller count to 910,163,968 every second and that tells it how quickly to oscillate? How does that work?

Thanks for any help.