Skip to content

Commit 43fc133

Browse files
robert-hhdpgeorge
authored andcommitted
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.
1 parent 3cc359c commit 43fc133

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ports/samd/mpconfigport.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ __attribute__((always_inline)) static inline uint32_t disable_irq(void) {
125125
do { \
126126
extern void mp_handle_pending(bool); \
127127
mp_handle_pending(true); \
128-
__WFI(); \
128+
__WFE(); \
129129
} while (0);
130130

131131
#define MICROPY_MAKE_POINTER_CALLABLE(p) ((void *)((mp_uint_t)(p) | 1))

0 commit comments

Comments
 (0)