disable_irq() error on ESP32

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
User avatar
water
Posts: 75
Joined: Sun Sep 24, 2017 9:16 am

disable_irq() error on ESP32

Post by water » Sat Aug 03, 2019 3:05 pm

I disable IRQ on ESP32 via

Code: Select all

disable_irq()
, error occur appear the message below, and reboot:

Code: Select all

>>> disable_irq()
395552
>>> Guru Meditation Error: Core  0 panic'ed (Interrupt wdt timeout on CPU0)
Core 0 register dump:
PC      : 0x400910d3  PS      : 0x00060b34  A0      : 0x800f3814  A1      : 0x3ffc1960  
A2      : 0x3ffb2fe0  A3      : 0x00000000  A4      : 0x3ffb302c  A5      : 0x00000000  
A6      : 0x00000000  A7      : 0x00000000  A8      : 0x800910d3  A9      : 0x3ffc1940  
A10     : 0x3ffb2fe0  A11     : 0x00000000  A12     : 0x000005a1  A13     : 0x3f420221  
A14     : 0x0000cdcd  A15     : 0x3ffc18dc  SAR     : 0x0000001e  EXCCAUSE: 0x00000005  
EXCVADDR: 0x00000000  LBEG    : 0x400014fd  LEND    : 0x4000150d  LCOUNT  : 0xfffffffe  

Backtrace: 0x400910d3:0x3ffc1960 0x400f3811:0x3ffc19a0 0x400f01ce:0x3ffc19c0 0x400f7169:0x3ffc19e0 0x400f77d7:0x3ffc1a00 0x400f00dc:0x3ffc1a40 0x4009086d:0x3ffc1a70

Core 1 register dump:
PC      : 0x4018a5d6  PS      : 0x00060134  A0      : 0x80102686  A1      : 0x3ffbc980  
A2      : 0x3ffb3985  A3      : 0x00060120  A4      : 0x00060620  A5      : 0x00000001  
A6      : 0x0000abab  A7      : 0x00060023  A8      : 0x80102ab5  A9      : 0x3ffbc970  
A10     : 0x00000003  A11     : 0x00060123  A12     : 0x00060120  A13     : 0x00000000  
A14     : 0x00060020  A15     : 0x00000000  SAR     : 0x0000001d  EXCCAUSE: 0x00000005  
EXCVADDR: 0x00000000  LBEG    : 0x00000000  LEND    : 0x00000000  LCOUNT  : 0x00000000  

Backtrace: 0x4018a5d6:0x3ffbc980 0x40102683:0x3ffbc9a0 0x40091f25:0x3ffbc9c0 0x4009086d:0x3ffbc9f0

Rebooting...
ets Jun  8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x1f (SPI_FAST_FLASH_BOOT)
is it normally ? or ESP32 not support disable_irq() function ?

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: disable_irq() error on ESP32

Post by Roberthh » Sat Aug 03, 2019 4:35 pm

Interrupt must be disabled only for a very short time. Otherwise the WDT will reboot the device. That's what you have seen.
A typical use case is:

Disable IRQ
Perform a short action
Enable IRQ

User avatar
water
Posts: 75
Joined: Sun Sep 24, 2017 9:16 am

Re: disable_irq() error on ESP32

Post by water » Sat Aug 03, 2019 10:43 pm

Thanks.

How can I list which IRQs allocated and theirs parameter currently ? (if I forgot them) ;)
and can I delete specific one ?
is it have multi priority level concept in Micropython ? the document looks like not more notice.

Post Reply