2023-07-31 12:12 PM - edited 2023-07-31 12:18 PM
I'm trying to use Range 2 mode in my custom STM32WB55 board to reduce power consumption in my board.
I found the protocol that switchs Range 1 to Range 2 mode in RM0434 document.
The basic protocol is like below and I found that three register should be changed to use Range 2 mode, which is RCC clock control, Flash ACR, and PWR control register (+PWR status register).
So, my question is how to change these registers and is there any example for change these or CubeMX to help change these value?
In addtion, I tried to change RCC clock using CubeMX but HCLK2 cannot be 16 MHz. Why?
Solved! Go to Solution.
2023-08-02 07:51 AM - edited 2023-08-02 07:52 AM
Hello again
After verification, is impossible to use RF communication in Range 2. Sytem clock in Range 2 should be under 16MHz but in RF transmittion CPU2 CLOCK must be 32MHz. What means system clock should be 32MHz.
Best Regards.
Issam
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.
2023-08-01 01:32 AM
Hello @KKIM.6 and welcome to ST Community.
go from Range 1 to Range 2 you have to:
you can do this importing some modification on your code's source files.
For your second question, the answer is in screenshot below.
Issam
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.
2023-08-01 07:35 AM
Still, my cubeMX shows error in HCLK2 in 16 MHz.
Where can I write Flash_ACR register and PWR_CR1 register?
Should I use cubeProgrammer after importing program to the microcontroller?
2023-08-01 08:02 AM - edited 2023-08-01 08:15 AM
Hello again
I suggest you to:
Best Regards.
Issam
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.
2023-08-01 08:06 AM
I found that the use of RCC caused the problem in HCLK2.
However, I cannot turn on RF if I do not use RCC.
What should I do?
or is it not mandatory to use HCLK2 in 16 MHz?
2023-08-01 08:26 AM
Hello again,
You have to keep your system frequency to 16MHz or lower. But if you go lower you need to check the Table 4 in the RM0434 to make sure about the wait states.
Can you add your RCC Mode and Configuration
Best Regards
Issam
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.
2023-08-01 11:49 AM
I upgraded CubeMX in the 6.9.1 version but still the problem doesn't be solved.
Here is my RCC configuration.
I created a new project and I'm changing each setup to find the reason.
2023-08-01 11:51 AM
The error disappear when RF is deactivated......OMG..
2023-08-02 07:51 AM - edited 2023-08-02 07:52 AM
Hello again
After verification, is impossible to use RF communication in Range 2. Sytem clock in Range 2 should be under 16MHz but in RF transmittion CPU2 CLOCK must be 32MHz. What means system clock should be 32MHz.
Best Regards.
Issam
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.
2023-08-02 10:23 AM
That means....we cannot use BLE in range 2 mode...that's too bad.