2017-10-10 07:02 AM
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.
Many thanks for your time and look forward for your response.
Kind regards,
Wassim Ben Chikha
2017-10-13 06:50 AM
What is the system frequency at the moment of attempted switch?
JW
2017-10-13 09:11 AM
For low frequenc
y (lower than 4MHz: 1, 2 or 4MHz).
BR
WBC
2017-10-13 09:33 AM
Are you sure this is the frequency *before* you try to switch?
Why are then RCC_ClkInitStruct items filled *after* the switch?
JW
2017-10-13 09:36 AM
I switch from 32 MHz to
low frequenc
y (lower than 4MHz: 1, 2 or 4MHz).
WBC
2017-10-13 09:36 AM
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
2017-10-13 09:39 AM
Show how.
JW
2017-10-13 09:43 AM