2024-04-19 12:04 PM
Hello,
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.
Solved! Go to Solution.
2024-05-29 12:14 PM
Hello @AJ_1
The best way to understand how this configuration works is to debug step by step the STM32CubeWL/Projects/NUCLEO-WL55JC/Applications/SubGHz_Phy/SubGHz_Phy_PingPong at main · STMicroelectronics/STM32CubeWL (github.com) example to understand how the settings work (from entering the frequency, creating the RF-PLL frequency = 32e6 x RFfreq / 225, dissect the 4 Bytes of the RF-PLL to setting this value using the Set_RfFrequency() command:
After that and using the SPI Communication internally implemented (Between the Sub-GHz part and the MCU). The RF frequency is set on the module (implemented by our Third party Semtech).
Best Regards.
STTwo-32
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-05-29 12:14 PM
Hello @AJ_1
The best way to understand how this configuration works is to debug step by step the STM32CubeWL/Projects/NUCLEO-WL55JC/Applications/SubGHz_Phy/SubGHz_Phy_PingPong at main · STMicroelectronics/STM32CubeWL (github.com) example to understand how the settings work (from entering the frequency, creating the RF-PLL frequency = 32e6 x RFfreq / 225, dissect the 4 Bytes of the RF-PLL to setting this value using the Set_RfFrequency() command:
After that and using the SPI Communication internally implemented (Between the Sub-GHz part and the MCU). The RF frequency is set on the module (implemented by our Third party Semtech).
Best Regards.
STTwo-32
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.