Guru Meditation Error: Core 0 panic'ed (Unhandled debug exception) because of watchdog not feed in time
-
Hi,
With the new firmware update, I get an new error that I did not have previously:>>> execfile("clock.py") Task watchdog got triggered. The following tasks did not feed the watchdog in time: Tasks currently running: CPU 0: MicroPy Aborting. Guru Meditation Error: Core 0 panic'ed (Unhandled debug exception) Register dump: PC : 400f2405 PS : 00060036 A0 : 800ea6bd A1 : 3ffd51f0 A2 : 0000000a A3 : 0000000a A4 : 00000004 A5 : 00000000 A6 : 00000000 A7 : fffffff8 A8 : 00000000 A9 : 3ffd5160 A10 : 00000000 A11 : 3ffdd7b3 A12 : 3ffd512f A13 : 00000030 A14 : 00000000 A15 : 00000002 SAR : 00000011 EXCCAUSE: 00000001 EXCVADDR: 00000000 LBEG : 4000c46c LEND : 4000c477 LCOUNT : 00000000 CPU halted.
Here is my code:
import time from machine import Pin SEGMENT_ON=0 SEGMENT_OFF=1 DIGIT_ON=1 DIGIT_OFF=0 HOURS=3 MINUTES=4 SECONDS=5 # # _b_ # a| | # |_h_|c # | | # g|___|e .d # f # a=Pin('P10', mode=Pin.OUT) #GP17 b=Pin('P11', mode=Pin.OUT) #GP22 c=Pin('P21', mode=Pin.OUT) #7 #GP8 d=Pin('P3', mode=Pin.OUT) #GP24 e=Pin('P4', mode=Pin.OUT) #GP11 f=Pin('P2', mode=Pin.OUT) #GP23 g=Pin('P19', mode=Pin.OUT)#1 #GP7 h=Pin('P23', mode=Pin.OUT)#5 #GP10 digit1=Pin('P12', mode=Pin.OUT) #GP20 digit2=Pin('P9', mode=Pin.OUT) #GP16 digit3=Pin('P8', mode=Pin.OUT) #GP15 digit4=Pin('P22', mode=Pin.OUT) #6 #GP9 digits= [digit1,digit2,digit3,digit4] digitSegments={ 1 : (c, e), 2 : (b, c, h, g, f), 3 : (b, c, h, e, f), 4 : (a, h, c, e), 5 : (b, a, h, e, f), 6 : (b, a, h, g, f, e), 7 : (b, c, e), 8 : (a, b, c, e, f, g, h), 9 : (a, b, c, e, f, h), 0 : (a, b, c, e, f, g) } def displayDigitSegment(digitSegmentsToDisplay): global digitSegments global SEGMENT_ON #Switch on the segments of the digit for digit in digitSegments.get(digitSegmentsToDisplay): digit.value(SEGMENT_ON) time.sleep_us(1000) for disableOldSegment in digitSegments.get(8): disableOldSegment.value(SEGMENT_OFF) return for disableOldSegment in digitSegments.get(8): disableOldSegment.value(SEGMENT_OFF) digit1.value(DIGIT_OFF) digit2.value(DIGIT_OFF) digit3.value(DIGIT_OFF) digit4.value(DIGIT_OFF) while True: clock=time.localtime(time.time()) sec=clock[SECONDS] minu=clock[MINUTES] for digitNum in range (0, 4): currDigit=digits[digitNum] currDigit.value(DIGIT_ON) if digitNum == 0: displayDigitSegment(minu//10) elif digitNum == 1: displayDigitSegment(minu%10) elif digitNum == 2: displayDigitSegment(sec//10) else: displayDigitSegment(sec%10) currDigit.value(DIGIT_OFF)
It is a 4 digit 7 segment display that I use to display the current minutes and seconds.
Later, I want to display the current temperature of my room.Has anyone encountered this error before? And if yes, have you managed to solve it and how?
Thank you :)
-
@Frida said in Guru Meditation Error: Core 0 panic'ed (Unhandled debug exception) because of watchdog not feed in time:
time.sleep_ms(1)
Hi,
Thank you, it worked :)
-
Try a time.sleep_ms(1) in your loop
-
With the thread example:
import _thread import time def th_func(delay, id): while True: time.sleep(delay) print('Running thread %d' % id) for i in range(2): _thread.start_new_thread(th_func, (i + 1, i))
it runs fine, but I cant quit with ctrl-c, and with ctrl-d it
PYB: soft reboot �MicroPython d78a5a3 on 2016-11-05; WiPy with ESP32 Type "help()" for more information. >>> Guru Meditation Error of type LoadProhibited occurred on core 0. Exception was unhandled. Register dump: PC : 40085076 PS : 00060433 A0 : 8008350d A1 : 3ffdd3f0 A2 : 3ffb00dc A3 : 3ffdd4f4 A4 : 8008382f A5 : 3ffdc970 A6 : 00000003 A7 : 00060e23 A8 : 00000000 A9 : 3ffb1248 A10 : 00000000 A11 : 00006711 A12 : 00060423 A13 : b33f0000 A14 : b33fffff A15 : 00060e23 SAR : 0000001a EXCCAUSE: 0000001c EXCVADDR: 00000000 LBEG : 00000000 LEND : 00000000 LCOUNT : 00000000 CPU halted.
on Wipy2