Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    non blocking LoRa receiver fails after ten thousand iterations

    Scheduled Pinned Locked Moved MicroPython
    3 Posts 3 Posters 961 Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • B Offline
      Baruch1966
      last edited by sakis

      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
      Aborting.
      Guru Meditation Error: Core 0 panic'ed (Unhandled debug exception)
      Register dump:
      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
      CPU halted.

      R 1 Reply Last reply Reply Quote 0
      • L Offline
        LoneTech
        last edited by

        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.

        1 Reply Last reply Reply Quote 0
        • R Offline
          Roberto @Baruch1966
          last edited by

          Hi @Baruch1966,

          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.

          Best,
          Roberto

          1 Reply Last reply Reply Quote 0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • 1 / 1
          • First post
            Last post

          Pycom on Twitter

          Pycom