🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Power on via RTC timer example

    Scheduled Pinned Locked Moved Core 2
    5 Posts 2 Posters 9.3k Views
    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.
    • felmueF Offline
      felmue
      last edited by felmue

      Hi guys

      Recently, while looking at the M5Core2 schematic, I realised that the fine M5Stack engineers connected the RTC interrupt output to the power key input of the AXP192. This means the RTC IC can power on a fully shutdown M5Core2 by either using a timer or an alarm.

      I've put together an example showing how to setup an RTC timer to power on the system.

      Cheers
      Felix

      GPIO translation table M5Stack / M5Core2
      Information about various M5Stack products.
      Code examples

      1 Reply Last reply Reply Quote 1
      • ZontexZ Offline
        Zontex
        last edited by

        Hi @felmue, Tested your code on M5Core2 works perfectly fine - it can also work with deep sleep function not just the normal sleep mode, I merged it with our master repository, thank you for your contribution!

        1 Reply Last reply Reply Quote 0
        • felmueF Offline
          felmue
          last edited by felmue

          Hello @Zontex

          cool, thanks.

          Regarding deep sleep: I don't think it works as expected. When I call M5.Axp.DeepSleep(1000 * 1000 * 2); I'd expect the system to restart from deep sleep after about 2 seconds, but instead the system shuts down completely and never wakes up again from deep sleep.

          The reason I think is that SetSleep() turns off power to the ESP32 IC and therefore line (time_in_us == 0) ? esp_deep_sleep_start() : esp_deep_sleep(time_in_us); is never executed and the system never goes into deep sleep but is shutdown completely.

          Note: If I comment out SetSleep() then deep sleep works as expected.

          I've submitted a issue for the deep sleep issue: https://github.com/m5stack/M5Core2/issues/17

          Thanks
          Felix

          GPIO translation table M5Stack / M5Core2
          Information about various M5Stack products.
          Code examples

          ZontexZ 1 Reply Last reply Reply Quote 1
          • ZontexZ Offline
            Zontex @felmue
            last edited by

            @felmue I'll have a look into this issue, I only tested the commented out version and it worked fine but if it's not commented out it does as you say, will look into it.

            1 Reply Last reply Reply Quote 0
            • felmueF Offline
              felmue
              last edited by

              Hi @Zontex

              thank you for looking into it, I appreciate it. Please let me know if there is anything I can help with or test.

              Thanks
              Felix

              GPIO translation table M5Stack / M5Core2
              Information about various M5Stack products.
              Code examples

              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
              • First post
                Last post