Start Range 2 mode in STM32WB55
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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.
- Labels:
-
STM32WB series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-08-02 7:51 AM - edited ‎2023-08-02 7: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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-08-01 1:32 AM
Hello @KKIM.6 and welcome to ST Community.
go from Range 1 to Range 2 you have to:
- Reduce the system frequency to a value lower or equal to 16 MHz. as you can see bellow.
- Write 010 to the Bits 2:0 of the Flash_ACR register to have two wait states ( refer to the Table 4 of the RM0434).
- Write 10 to the Bits 2:0 of the PWR_CR1 register to select RANGE 2.
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-08-01 7: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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-08-01 8:02 AM - edited ‎2023-08-01 8:15 AM
Hello again
I suggest you to:
- Update your CubeMX to the last version.
- Is always better to change the registers value in your code before importing the program to the microcontroller.
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-08-01 8: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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-08-01 8: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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-08-01 11:51 AM
The error disappear when RF is deactivated......OMG..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-08-02 7:51 AM - edited ‎2023-08-02 7: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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-08-02 10:23 AM
That means....we cannot use BLE in range 2 mode...that's too bad.
