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.
This commit is contained in:
parent
e20bb98392
commit
9d2e179fa5
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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))
|
||||
|
Loading…
x
Reference in New Issue
Block a user