This is an automated email from the ASF dual-hosted git repository.
jerzy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
The following commit(s) were added to refs/heads/master by this push:
new 262a66bf6 mcu/stm32l0: Fix voltage scaling configuration
262a66bf6 is described below
commit 262a66bf657240a15f9c0c65b4ffdbaac6617873
Author: Jerzy Kasenberg <[email protected]>
AuthorDate: Sat May 18 20:06:21 2024 +0200
mcu/stm32l0: Fix voltage scaling configuration
Voltage scaling setting was done with PWR peripheral
clock turned off which does not change anything.
---
hw/mcu/stm/stm32l0xx/src/clock_stm32l0xx.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/mcu/stm/stm32l0xx/src/clock_stm32l0xx.c
b/hw/mcu/stm/stm32l0xx/src/clock_stm32l0xx.c
index f5d1f3e67..b844afc24 100644
--- a/hw/mcu/stm/stm32l0xx/src/clock_stm32l0xx.c
+++ b/hw/mcu/stm/stm32l0xx/src/clock_stm32l0xx.c
@@ -59,7 +59,9 @@ SystemClock_Config(void)
* voltage scaling value regarding system frequency refer to product
* datasheet.
*/
+ __HAL_RCC_PWR_CLK_ENABLE();
__HAL_PWR_VOLTAGESCALING_CONFIG(MYNEWT_VAL(STM32_CLOCK_VOLTAGESCALING_CONFIG));
+ __HAL_RCC_PWR_CLK_DISABLE();
osc_init.OscillatorType = RCC_OSCILLATORTYPE_NONE;