Skip to content

Commit

Permalink
samd/mpconfigport: Use __WFE() in MICROPY_EVENT_POLL_HOOK.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
robert-hh authored and dpgeorge committed Dec 14, 2022
1 parent 3cc359c commit 43fc133
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ports/samd/mpconfigport.h
Expand Up @@ -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))
Expand Down

0 comments on commit 43fc133

Please sign in to comment.