cancel
Showing results for 
Search instead for 
Did you mean: 

Values of the bits VOS[1:0] for ranges 1,2 and 3

Wassim Ben Chikha
Associate II
Posted on October 10, 2017 at 16:02

Hello,

I

use the

STM32L152RE

device

with

STM32Cube_FW_L1_V1.8.0

Please,  can you verify if there is problem in defining the values of the bits  VOS[1:0], which are defined in the manual of STM32L100xx, STM32L151xx,  STM32L152xx and STM32L162xx advanced ARM ® -based 32-bit MCUs (RM0038  Reference manual) as follows:

- 00: forbidden (bits are unchanged and keep the previous value, no voltage scaling range changed);

- 01: 1.8 V (range 1);

- 10: 1.5 V (range 2);

- 11: 1.2 V (range 3).

In fact, when I tried to execute __HAL_PWR_VOLTAGESCALING_CONFIG function with PWR_REGULATOR_VOLTAGE_SCALE3 (VOS=11), the execution failed. After resetting to 00(VOS=00), the execution succeed. Please, can you verify if the values of VOS should be definedas follows:

- 00: 1.8 V (range 1);

- 01: 1.5 V (range 2);

- 10: 1.2 V (range 3);

- 11: forbidden (bits are unchanged and keep the previous value, no voltage scaling range changed).

As shown in the following print screen, I added other printf after the next instructions. But, the message before

__HAL_PWR_VOLTAGESCALING_CONFIG function appears, while other messages does not appear. It means that all instructions before this function are executed, while this function stops the execution of the next instructions.

0690X00000608YFQAY.png

0690X00000608XYQAY.png

Many thanks for your time and look forward for your response.

Kind regards,

Wassim Ben Chikha

7 REPLIES 7
Posted on October 13, 2017 at 15:50

What is the system frequency at the moment of attempted switch?

JW

Posted on October 13, 2017 at 16:11

For low frequenc

y (lower than 4MHz: 1, 2 or 4MHz).

BR

WBC

Posted on October 13, 2017 at 16:33

Are you sure this is the frequency *before* you try to switch?

Why are then RCC_ClkInitStruct items filled *after* the switch?

JW

Posted on October 13, 2017 at 16:36

I switch from 32 MHz to

low frequenc

y (lower than 4MHz: 1, 2 or 4MHz).

WBC

Posted on October 13, 2017 at 18:36

Well, I don' use Cube nor the 'L1xx family so I don't understand what's going on there. I can't help you more.

If you are confident the clock frequency is OK at the moment of switching PVD and still find you have a problem, you should probably talk to your FAE or ask for support through the

http://www.st.com/content/st_com/en/support/online-support.html

.

JW

Posted on October 13, 2017 at 16:39

Show how.

JW

Posted on October 13, 2017 at 16:43

The original post was too long to process during our migration. Please click on the provided URL to read the original post. https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I6tq&d=%2Fa%2F0X0000000bxd%2FGDz5orMFwO4WevueQxQYnvbUyCvdyNgAN_yMMqzn5sA&asPdf=false