Skip to main content
Wassim Ben Chikha
Associate III
October 10, 2017
Question

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

  • October 10, 2017
  • 7 replies
  • 1850 views
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

    This topic has been closed for replies.

    7 replies

    waclawek.jan
    Super User
    October 13, 2017
    Posted on October 13, 2017 at 15:50

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

    JW

    Wassim Ben Chikha
    Associate III
    October 13, 2017
    Posted on October 13, 2017 at 16:11

    For low frequenc

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

    BR

    WBC

    waclawek.jan
    Super User
    October 13, 2017
    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

    waclawek.jan
    Super User
    October 13, 2017
    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