Skip to content
  • 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
  • Getting Started
  • Controller
  • Build
  • Hardware
  • Download/API
  • Forum
  • Store

[SOLVED] latest git-snapshot causes freezes

Scheduled Pinned Locked Moved Troubleshooting
46 Posts 6 Posters 9.5k 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 ;-)

    YveauxY Offline
    YveauxY 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
    • YveauxY 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.

      tekkaT 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.

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


              16

              Online

              11.7k

              Users

              11.2k

              Topics

              113.0k

              Posts


              Copyright 2019 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
              • OpenHardware.io
              • Categories
              • Recent
              • Tags
              • Popular