mimxrt: Fix CPU freeze when calling __WFE() in MICROPY_EVENT_POLL_HOOK.

This issue affected i.MX RT 1052, 1062 and 1064.  It seems to be addressed
by Errata ERR006223, which also mentions i.MX RT101x and 102x, but these
devices worked well even without the change.  As a side effect, the current
consumption at an idle REPL drops significantly with this fix.

Fixes issue #7235.
pull/9638/head
robert-hh 2022-10-22 21:28:42 +02:00 zatwierdzone przez Damien George
rodzic e20bb98392
commit 9d2e179fa5
4 zmienionych plików z 4 dodań i 0 usunięć

Wyświetl plik

@ -465,4 +465,5 @@ void BOARD_BootClockRUN(void) {
IOMUXC_GPR->GPR5 &= ~IOMUXC_GPR_GPR5_VREF_1M_CLK_GPT2_MASK;
/* Set SystemCoreClock variable. */
SystemCoreClock = BOARD_BOOTCLOCKRUN_CORE_CLOCK;
CLOCK_SetMode(kCLOCK_ModeRun);
}

Wyświetl plik

@ -487,4 +487,5 @@ void BOARD_BootClockRUN(void) {
IOMUXC_GPR->GPR5 &= ~IOMUXC_GPR_GPR5_VREF_1M_CLK_GPT2_MASK;
/* Set SystemCoreClock variable. */
SystemCoreClock = BOARD_BOOTCLOCKRUN_CORE_CLOCK;
CLOCK_SetMode(kCLOCK_ModeRun);
}

Wyświetl plik

@ -487,4 +487,5 @@ void BOARD_BootClockRUN(void) {
IOMUXC_GPR->GPR5 &= ~IOMUXC_GPR_GPR5_VREF_1M_CLK_GPT2_MASK;
/* Set SystemCoreClock variable. */
SystemCoreClock = BOARD_BOOTCLOCKRUN_CORE_CLOCK;
CLOCK_SetMode(kCLOCK_ModeRun);
}

Wyświetl plik

@ -241,6 +241,7 @@ extern const struct _mp_obj_type_t network_lan_type;
do { \
extern void mp_handle_pending(bool); \
mp_handle_pending(true); \
__WFE(); \
} while (0);
#define MICROPY_MAKE_POINTER_CALLABLE(p) ((void *)((mp_uint_t)(p) | 1))