frame

thread() rebooting

Hi,
I have a NextionHMI.beep (2) function in an external module. When I run the function in main.py outside the thread (), it works normally but thread (NextionHMI.beep, 2), the following error message appears in the console:

Guru Meditation Error of type IllegalInstruction occurred on core  0. Exception was unhandled.
Register dump:
PC      : 0x400e3524  PS      : 0x00060a30  A0      : 0x00000000  A1      : 0x3ffc4e00  
A2      : 0x00000000  A3      : 0x40152029  A4      : 0x3ffc44e0  A5      : 0x00000000  
A6      : 0x000000fe  A7      : 0x3ffc44ac  A8      : 0x800e3524  A9      : 0x3ffc4de0  
A10     : 0x3ffd2d94  A11     : 0x00000001  A12     : 0x3ffb13c0  A13     : 0x3ffc4524  
A14     : 0x00000000  A15     : 0x00000005  SAR     : 0x00000010  EXCCAUSE: 0x00000000  
EXCVADDR: 0x00000000  LBEG    : 0x4000c46c  LEND    : 0x4000c477  LCOUNT  : 0x00000000  
Backtrace: 0x400e3524:0x3ffc4e00 0x7ffffffd:0x3ffc4e60
Rebooting...
ets Jun  8 2016 00:22:57
rst:0xc (SW_CPU_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0x00
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0008,len:8
load:0x3fff0010,len:2020
load:0x40078000,len:9068
load:0x40080000,len:252
entry 0x40080034
Guru Meditation Error of type IllegalInstruction occurred on core  0. Exception was unhandled.
Register dump:
PC      : 0x400e3524  PS      : 0x00060a30  A0      : 0x00000000  A1      : 0x3ffc4e00  
A2      : 0x00000000  A3      : 0x40152029  A4      : 0x3ffc44e0  A5      : 0x00000000  
A6      : 0x000000fe  A7      : 0x3ffc44ac  A8      : 0x800e3524  A9      : 0x3ffc4de0  
A10     : 0x3ffd2d94  A11     : 0x00000001  A12     : 0x3ffb13c0  A13     : 0x3ffc4524  
A14     : 0x00000000  A15     : 0x00000005  SAR     : 0x00000010  EXCCAUSE: 0x00000000  
EXCVADDR: 0x00000000  LBEG    : 0x4000c46c  LEND    : 0x4000c477  LCOUNT  : 0x00000000  
Backtrace: 0x400e3524:0x3ffc4e00 0x7ffffffd:0x3ffc4e60
Rebooting...
ets Jun  8 2016 00:22:57
rst:0xc (SW_CPU_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0x00
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0008,len:8
load:0x3fff0010,len:2020
load:0x40078000,len:9068
load:0x40080000,len:252
entry 0x40080034

In NextionHMI.py :

pinMode(D4,OUTPUT)
digitalWrite(D4, HIGH)
def beep(qt):
    for i in range(qt):
        digitalWrite(D4, LOW)
        sleep(50)
        digitalWrite(D4, HIGH)
        sleep(100)

Comments

  • ESP32 DevKitC
  • Hi cesarbudaye,

    This is a known bug on which we are already working on.
    In the meantime, you can proceed your app implementation suspending (not terminating) your thread; you can use a Lock() object to suspend and wake up your thread when you need.

    Stay tuned for new updates :)
    Matteo Cipriani
    Zerynth Support Team
  • Has this been resolved?  I'm seeing something similar where a thread I use to initialize a board causes the main thread to stop executing when the init thread is finished.
  • Hi martinrleon,

    unfortunately not yet; we have in pipeline to solve this issue and we hope to publish this bug fix in one of our future releases.
    In the meantime, you can follow the previous advice and never terminating a thread.

    Stay tuned :)
    Matteo Cipriani
    Zerynth Support Team
Sign In or Register to comment.

ZERYNTH Community

@ 2016 Zerynth.com, all rights reserved.