From e5290a28864aadf6df4a6c6b31de11441584bc55 Mon Sep 17 00:00:00 2001 From: Uri Shaked Date: Tue, 14 Sep 2021 01:09:15 +0300 Subject: [PATCH 1/2] Enable WFI for raspberrypi port See #5331 for details --- ports/raspberrypi/supervisor/port.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/raspberrypi/supervisor/port.c b/ports/raspberrypi/supervisor/port.c index 68d127704653..1b72592172a7 100644 --- a/ports/raspberrypi/supervisor/port.c +++ b/ports/raspberrypi/supervisor/port.c @@ -238,8 +238,8 @@ void port_interrupt_after_ticks(uint32_t ticks) { void port_idle_until_interrupt(void) { common_hal_mcu_disable_interrupts(); if (!background_callback_pending()) { -// asm volatile ("dsb 0xF":::"memory"); -// __wfi(); + asm volatile ("dsb 0xF":::"memory"); + __wfi(); } common_hal_mcu_enable_interrupts(); } From 650ce17c0db07662c69c843b7dc32df415165e9b Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Mon, 13 Sep 2021 19:12:21 -0400 Subject: [PATCH 2/2] Fix formatting --- ports/raspberrypi/supervisor/port.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/raspberrypi/supervisor/port.c b/ports/raspberrypi/supervisor/port.c index 1b72592172a7..213084582b96 100644 --- a/ports/raspberrypi/supervisor/port.c +++ b/ports/raspberrypi/supervisor/port.c @@ -238,7 +238,7 @@ void port_interrupt_after_ticks(uint32_t ticks) { void port_idle_until_interrupt(void) { common_hal_mcu_disable_interrupts(); if (!background_callback_pending()) { - asm volatile ("dsb 0xF":::"memory"); + asm volatile ("dsb 0xF" ::: "memory"); __wfi(); } common_hal_mcu_enable_interrupts();