diff --git a/arch/arm/src/stm32wl5/stm32wl5_pwr.c b/arch/arm/src/stm32wl5/stm32wl5_pwr.c index 059a9ca24f..58ec08cb17 100644 --- a/arch/arm/src/stm32wl5/stm32wl5_pwr.c +++ b/arch/arm/src/stm32wl5/stm32wl5_pwr.c @@ -29,6 +29,7 @@ #include #include +#include "hardware/stm32wl5_pwr.h" #include "arm_internal.h" #include "stm32wl5_pwr.h" #include "stm32wl5_rcc.h" @@ -106,3 +107,17 @@ bool stm32wl5_pwr_enablebkp(bool writable) return waswritable; } + +/**************************************************************************** + * Name: stm32wl5_pwr_boot_c2 + * + * Description: + * Boots up CPU2 (cortex-m0) after reset or wakeup from stop or standby + * modes. + * + ****************************************************************************/ + +void stm32wl5_pwr_boot_c2(void) +{ + modifyreg32(STM32WL5_PWR_CR4, 0, PWR_CR4_C2BOOT); +} diff --git a/arch/arm/src/stm32wl5/stm32wl5_pwr.h b/arch/arm/src/stm32wl5/stm32wl5_pwr.h index 55ec2b3403..5cfb6e4519 100644 --- a/arch/arm/src/stm32wl5/stm32wl5_pwr.h +++ b/arch/arm/src/stm32wl5/stm32wl5_pwr.h @@ -68,6 +68,17 @@ extern "C" bool stm32wl5_pwr_enablebkp(bool writable); +/**************************************************************************** + * Name: stm32wl5_pwr_boot_c2 + * + * Description: + * Boots up CPU2 (cortex-m0) after reset or wakeup from stop or standby + * modes. + * + ****************************************************************************/ + +void stm32wl5_pwr_boot_c2(void); + #undef EXTERN #if defined(__cplusplus) }