Skip to main content
KKIM.6
Senior
July 31, 2023
Solved

Start Range 2 mode in STM32WB55

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).

image.png

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?

This topic has been closed for replies.
IIRHO.1
IIRHO.1Best answer
ST Employee
August 2, 2023

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.

10 replies

IIRHO.1
ST Employee
August 1, 2023

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.

IIRHO1_0-1690876984075.png

  • 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.
KKIM.6
KKIM.6Author
Senior
August 1, 2023

KKIM6_0-1690900425846.png

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?

IIRHO.1
ST Employee
August 1, 2023

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.
IIRHO.1
IIRHO.1Best answer
ST Employee
August 2, 2023

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.
KKIM.6
KKIM.6Author
Senior
August 2, 2023

That means....we cannot use BLE in range 2 mode...that's too bad.