RTC_DATA_ATTR Failure

Viewing 4 reply threads
  • Author
    Posts
    • #30688
      William
      Moderator

        Gist of E220_Ticker_Test_Receiver.ino

        RTC_DATA_ATTR is not saving variables when going to deep sleep.

        Trying to create elapsed timer using Ticker library; minuteTicker.attach keeps re-initalizing intterrupt.

        Another RTC variable does not work; bootcount is always  1.

        I did my best to follow article:

        Ebyte LoRa E220 device for Arduino, esp32 or esp8266: WOR microcontroller and esp32 dev v1 shield .

         

        William

      • #30705
        Renzo Mischianti
        Keymaster

          Hi Willian,
          the code is quite complex, and I need time to check It in depth, but what is the scope of the Ticker library?
          Bye Renzo

        • #30709
          William
          Moderator

            Hi Renzo,

            Thank you for having a look at the code. Yes, the code is complex.
            Took another look at my Gist file; found I missed making these corrections: lines: 150 redefination Lora E220, 299, 301, 303 e32ttl should be e220ttl. Testing now…

            Ticker library is used to get a one minute timer to take from the start code unit the INA226 alerts for a low battery.

            Could be an interrupt conflick; there are (if memory serves me correctly, three interrupts).

            William

            • This reply was modified 1 year, 5 months ago by William.
            • This reply was modified 1 year, 5 months ago by William. Reason: Additional. Corrections
          • #30718
            William
            Moderator

              Update 5/12/2024:

              Github repository has been updated. Receiver is now able to go to deep sleep; however have not been able to wake up deep sleeping receiver, unable to further test RTC_DATA_ATTR_failure.

              Github Project Repository

              This project code does not use Ticker.

              William

              • This reply was modified 1 year, 5 months ago by William.
            • #30765
              William
              Moderator

                5/29/2024 Update: Have been working on the “complex code.” Now have an issue with deep Sleep interrupt; where starting with a press of the reset button on the Receiver response is corect in the Serial Monitor. First url request on Receiver is correct. Interrupt works correctly. “After interrupt:” does print to the Serial Monitor after the first url request. Going on with more url requests; interrupt does not work correctly. Have spent much time trying to get this code to work correctly.

                Putting together a short 2-3 minute video of the Arduino IDE, Serial Monitor of this code showing url request being made and the Receiver code responses. Will upload video in the morning.

                GitHub update from today

                William

                • This reply was modified 1 year, 4 months ago by William.
            Viewing 4 reply threads
            • You must be logged in to reply to this topic.
            Exit mobile version