diff options
author | robert-hh <robert@hammelrath.com> | 2022-11-12 20:40:26 +0100 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2022-12-14 12:40:22 +1100 |
commit | 43fc133dbd976ece5c746d76b828260057060a6b (patch) | |
tree | 3624cbe45825ce8785fbd73804bc8ed0beaf2582 | |
parent | 3cc359c20473f8b64fed9daa86410bec9669cc79 (diff) |
samd/mpconfigport: Use __WFE() in MICROPY_EVENT_POLL_HOOK.
Like WFI, WFE also responds to a hardware interrupt, and using WFE speeds
up at least spi.read(). Power consumption at an idle REPL is unchanged.
-rw-r--r-- | ports/samd/mpconfigport.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ports/samd/mpconfigport.h b/ports/samd/mpconfigport.h index 0e940e1c9..878f481f4 100644 --- a/ports/samd/mpconfigport.h +++ b/ports/samd/mpconfigport.h @@ -125,7 +125,7 @@ __attribute__((always_inline)) static inline uint32_t disable_irq(void) { do { \ extern void mp_handle_pending(bool); \ mp_handle_pending(true); \ - __WFI(); \ + __WFE(); \ } while (0); #define MICROPY_MAKE_POINTER_CALLABLE(p) ((void *)((mp_uint_t)(p) | 1)) |