boards/stm32wl5jc: add support to enable CPU2 booting at startup

Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl>
This commit is contained in:
Michał Łyszczek 2022-08-03 13:07:25 +02:00 committed by Xiang Xiao
parent cc08ae67cb
commit dcc2499926
2 changed files with 14 additions and 0 deletions

View File

@ -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

View File

@ -39,6 +39,7 @@
#include <stm32wl5.h>
#include <stm32wl5_uart.h>
#include <stm32wl5_pwr.h>
#include <arch/board/board.h>
@ -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;
}