Hi,
I've been experimenting with handling deadlocks in MicroPython on ESP32 Thingy.
Can I use an interrupt handler to reset the system? I've tried handling an edge on pin 0 but either it isn't called or it's code is blocked.
I'd like to modify/remove main.py and call machine.reset() from the interrupt. Is this possible?
Cheers,
Bitrat
reset after deadlock
Re: reset after deadlock
I think esp32 pin interrupts are "soft" which means they need to be scheduled by MicroPython, which won't work if you're deadlocked.
Would the watchdog timer (WDT) be useful for this?
Would the watchdog timer (WDT) be useful for this?
Re: reset after deadlock
Thanks jimmo,
yeah I'll need to do something more robust with the WDT eventually. i was just looking for an easier way to unbrick my device while debugging (I'm writing some monitor classes).
I'll be using C eventually so not too worried. I guess it's the FreeRTOS layer that catches the real irq.
Cheers!
yeah I'll need to do something more robust with the WDT eventually. i was just looking for an easier way to unbrick my device while debugging (I'm writing some monitor classes).
I'll be using C eventually so not too worried. I guess it's the FreeRTOS layer that catches the real irq.
Cheers!