From aac4653538c85884bcf663f75ad04f4cdc36fb8c Mon Sep 17 00:00:00 2001 From: Damien George Date: Mon, 26 Jan 2026 01:05:11 +1100 Subject: [PATCH] alif/boards/OPENMV_AE3: Allow user button to wake from sleep. Signed-off-by: Damien George --- ports/alif/boards/OPENMV_AE3/board.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ports/alif/boards/OPENMV_AE3/board.c b/ports/alif/boards/OPENMV_AE3/board.c index 249c435cc8..a0b8378846 100644 --- a/ports/alif/boards/OPENMV_AE3/board.c +++ b/ports/alif/boards/OPENMV_AE3/board.c @@ -154,8 +154,8 @@ void board_early_init(void) { .vtor_address = SCB->VTOR, .vtor_address_ns = SCB->VTOR, // Configure wake-up sources. - .ewic_cfg = EWIC_RTC_A, - .wakeup_events = WE_LPRTC, + .ewic_cfg = EWIC_VBAT_GPIO | EWIC_RTC_A, + .wakeup_events = WE_LPGPIO7 | WE_LPGPIO6 | WE_LPGPIO5 | WE_LPGPIO4 | WE_LPRTC, }; if (se_services_set_off_profile(&off_profile)) { @@ -166,6 +166,9 @@ void board_early_init(void) { if (se_services_select_pll_source(PLL_SOURCE_PLL, PLL_TARGET_PD4_SRAM)) { MICROPY_BOARD_FATAL_ERROR("se_services_select_pll_source"); } + + // Configure the user button as an input (it has an external pull-up). + mp_hal_pin_input(pin_SW); } MP_WEAK void board_enter_stop(void) {