Skip to content

Commit aac4653

Browse files
committed
alif/boards/OPENMV_AE3: Allow user button to wake from sleep.
Signed-off-by: Damien George <damien@micropython.org>
1 parent 414fcbf commit aac4653

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

  • ports/alif/boards/OPENMV_AE3

ports/alif/boards/OPENMV_AE3/board.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,8 @@ void board_early_init(void) {
154154
.vtor_address = SCB->VTOR,
155155
.vtor_address_ns = SCB->VTOR,
156156
// Configure wake-up sources.
157-
.ewic_cfg = EWIC_RTC_A,
158-
.wakeup_events = WE_LPRTC,
157+
.ewic_cfg = EWIC_VBAT_GPIO | EWIC_RTC_A,
158+
.wakeup_events = WE_LPGPIO7 | WE_LPGPIO6 | WE_LPGPIO5 | WE_LPGPIO4 | WE_LPRTC,
159159
};
160160

161161
if (se_services_set_off_profile(&off_profile)) {
@@ -166,6 +166,9 @@ void board_early_init(void) {
166166
if (se_services_select_pll_source(PLL_SOURCE_PLL, PLL_TARGET_PD4_SRAM)) {
167167
MICROPY_BOARD_FATAL_ERROR("se_services_select_pll_source");
168168
}
169+
170+
// Configure the user button as an input (it has an external pull-up).
171+
mp_hal_pin_input(pin_SW);
169172
}
170173

171174
MP_WEAK void board_enter_stop(void) {

0 commit comments

Comments
 (0)