Skip to content

Commit 638ae13

Browse files
committed
fix(wb): HAL_PWREx_ControlVoltageScaling is not for all STM32WB
it depends of PWR_CR1_VOS Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parent 082ca1f commit 638ae13

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/low_power.c

+3
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,8 @@ void SystemClock_Decrease(void)
278278

279279
/** Configure the main internal regulator output voltage
280280
*/
281+
282+
#if (defined(STM32WBxx) && defined(PWR_CR1_VOS)) || !defined(STM32WBxx)
281283
#if defined(STM32L4xx) || defined(STM32WBxx)
282284
if (HAL_PWREx_ControlVoltageScaling(PWR_REGULATOR_VOLTAGE_SCALE1) != HAL_OK)
283285
#elif defined(STM32L5xx) || defined(STM32WLxx)
@@ -286,6 +288,7 @@ void SystemClock_Decrease(void)
286288
{
287289
Error_Handler();
288290
}
291+
#endif
289292

290293
/** Initializes the RCC Oscillators according to the specified parameters
291294
* in the RCC_OscInitTypeDef structure.

0 commit comments

Comments
 (0)