Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Troubleshooting
  3. [SOLVED] latest git-snapshot causes freezes

[SOLVED] latest git-snapshot causes freezes

Scheduled Pinned Locked Moved Troubleshooting
46 Posts 6 Posters 12.2k Views 5 Watching
  • 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.
  • cimba007C cimba007

    I only used the pin change interrupt in another sketch. I was doubting Serial in sections without isr too! But they are clever. Serial output depends on polling in sections where interrupts are disabled ;-)

    Y Offline
    Y Offline
    Yveaux
    Mod
    wrote on last edited by
    #41

    @cimba007 said:

    Serial output depends on polling in sections where interrupts are disabled

    Ok, learned something today ;-)

    The PR has now been merged to development btw.

    http://yveaux.blogspot.nl

    cimba007C chrilleC 2 Replies Last reply
    0
    • Y Yveaux

      @cimba007 said:

      Serial output depends on polling in sections where interrupts are disabled

      Ok, learned something today ;-)

      The PR has now been merged to development btw.

      cimba007C Offline
      cimba007C Offline
      cimba007
      wrote on last edited by cimba007
      #42

      @Yveaux While we are at this topic .. any chance to let the user-code know what caused the wakeup during sleep() ??

      For example .. if there was a wakeup at all or which of the two interrupt sources was the cause.

      Unforunatly the "cause" gets cleaned up at the end of hwSleep:

      bool interruptWakeUp()
      {
          return _wokeUpByInterrupt != INVALID_INTERRUPT_NUM;
      }
      

      Calling this from user-code will always return 0 as the end of hwSleep does this:

       _wokeUpByInterrupt = INVALID_INTERRUPT_NUM;
      

      Not clearing the "last interrupt source" would be nice.

      T 1 Reply Last reply
      0
      • cimba007C cimba007

        @Yveaux While we are at this topic .. any chance to let the user-code know what caused the wakeup during sleep() ??

        For example .. if there was a wakeup at all or which of the two interrupt sources was the cause.

        Unforunatly the "cause" gets cleaned up at the end of hwSleep:

        bool interruptWakeUp()
        {
            return _wokeUpByInterrupt != INVALID_INTERRUPT_NUM;
        }
        

        Calling this from user-code will always return 0 as the end of hwSleep does this:

         _wokeUpByInterrupt = INVALID_INTERRUPT_NUM;
        

        Not clearing the "last interrupt source" would be nice.

        T Offline
        T Offline
        tekka
        Admin
        wrote on last edited by
        #43

        @cimba007 The return value of sleep() indicates the wake-up cause: irq (nr) or timer (=MY_WAKE_UP_BY_TIMER).
        See here: https://github.com/mysensors/MySensors/blob/development/core/MyHwATMega328.cpp#L146-L147

        cimba007C 1 Reply Last reply
        0
        • ikkeTI Offline
          ikkeTI Offline
          ikkeT
          wrote on last edited by
          #44

          I also confirm it fixed my problem. Thank you!

          1 Reply Last reply
          1
          • T tekka

            @cimba007 The return value of sleep() indicates the wake-up cause: irq (nr) or timer (=MY_WAKE_UP_BY_TIMER).
            See here: https://github.com/mysensors/MySensors/blob/development/core/MyHwATMega328.cpp#L146-L147

            cimba007C Offline
            cimba007C Offline
            cimba007
            wrote on last edited by
            #45

            @tekka Thanks, that is what I was looking for

            1 Reply Last reply
            0
            • Y Yveaux

              @cimba007 said:

              Serial output depends on polling in sections where interrupts are disabled

              Ok, learned something today ;-)

              The PR has now been merged to development btw.

              chrilleC Offline
              chrilleC Offline
              chrille
              wrote on last edited by
              #46

              @Yveaux Thank you for committing this fix. I had the same issue and it caused me a lot of headache

              1 Reply Last reply
              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
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              21

              Online

              12.1k

              Users

              11.2k

              Topics

              113.4k

              Posts


              Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • MySensors
              • OpenHardware.io
              • Categories
              • Recent
              • Tags
              • Popular