non blocking LoRa receiver fails after ten thousand iterations
from network import LoRa import socket lora = LoRa(mode=LoRa.LORA) s = socket.socket(socket.AF_LORA, socket.SOCK_RAW) s.setblocking(False) print('start program') while True: c = s.recv(1)
this result into
Task watchdog got triggered. The following tasks did not feed the watchdog in time:
Tasks currently running:
CPU 0: MicroPy
Guru Meditation Error: Core 0 panic'ed (Unhandled debug exception)
PC : 4000bff0 PS : 00060036 A0 : 80084de8 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 : 00060d23 SAR : 0000001d EXCCAUSE: 00000001
EXCVADDR: 00000000 LBEG : 4000c46c LEND : 4000c477 LCOUNT : 00000000
This was a known issue with the Watchdog Timer in the Wipy 2.0 and LoPy. Please download the latest firmare version and try your code again.
Firmware 0.9.3.b2 had an issue where it wouldn't feed the watchdog, leading to crashes for anything that kept the Python core busy (for about 4 seconds), including large file transfers and tight loops. You could work around it by calling
time.sleep_ms(1)but that would naturally cause a delay. This issue seems resolved in release 0.9.4.b1.