esp8266/machine_pin: Move pin_intr_handler to iRAM, de-support hard IRQ.

GPIO interrupts can occur when the flash ROM cache is in use and so the
GPIO interrupt handler must be in iRAM.  This commit moves the handler to
iRAM, and also moves mp_sched_schedule to iRAM which is called by
pin_intr_handler.

As part of this fix the Pin class can no longer support hard=True in the
Pin.irq() method, because the VM and runtime are too big to put in iRAM.

Fixes #5714.
This commit is contained in:
Damien George
2020-04-23 16:19:15 +10:00
parent 544c308c18
commit 0bd58a5613
2 changed files with 6 additions and 19 deletions

View File

@@ -192,5 +192,6 @@ extern const struct _mp_obj_module_t mp_module_onewire;
#define MP_FASTCODE(n) __attribute__((section(".iram0.text." #n))) n
#define MICROPY_WRAP_MP_KEYBOARD_INTERRUPT(f) MP_FASTCODE(f)
#define MICROPY_WRAP_MP_SCHED_SCHEDULE(f) MP_FASTCODE(f)
#define _assert(expr) ((expr) ? (void)0 : __assert_func(__FILE__, __LINE__, __func__, #expr))