diff --git a/boards/arm/stm32wl5/nucleo-wl55jc/Kconfig b/boards/arm/stm32wl5/nucleo-wl55jc/Kconfig index 60e2258a52..d835d48392 100644 --- a/boards/arm/stm32wl5/nucleo-wl55jc/Kconfig +++ b/boards/arm/stm32wl5/nucleo-wl55jc/Kconfig @@ -17,6 +17,13 @@ config ARCH_BOARD_NUCLEO_WL55JC_DEMO_LED_IRQ comment "[demo] LED on button interrupt requires NSH_ARCHINIT" depends on !NSH_ARCHINIT || !ARCH_BUTTONS +config ARCH_BOARD_ENABLE_CPU2 + bool "Enable CPU2 on startup" + default n + ---help--- + When enabled, CPU2 (cortex-m0) will be started up. CPU2 + will be booted after all initialization on CPU1 is done. + menuconfig ARCH_BOARD_FLASH_MOUNT bool "Enable FLASH partitioning and mounting" depends on !DISABLE_MOUNTPOINT diff --git a/boards/arm/stm32wl5/nucleo-wl55jc/src/stm32_appinit.c b/boards/arm/stm32wl5/nucleo-wl55jc/src/stm32_appinit.c index ce76a4d883..16b65e8fca 100644 --- a/boards/arm/stm32wl5/nucleo-wl55jc/src/stm32_appinit.c +++ b/boards/arm/stm32wl5/nucleo-wl55jc/src/stm32_appinit.c @@ -39,6 +39,7 @@ #include #include +#include #include @@ -132,6 +133,12 @@ int board_app_initialize(uintptr_t arg) } #endif +#if defined(CONFIG_ARCH_BOARD_ENABLE_CPU2) + /* Start second CPU */ + + stm32wl5_pwr_boot_c2(); +#endif + return ret; }