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

    Wakeup Core2 v1.1 by USB and GPIO possible?

    Core 2
    2
    3
    48
    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.
    • D
      davincino
      last edited by davincino

      Hello together,

      I want to put the device into deep sleep and wake it up either when USB power supply is connected or when PIR (connected on Grove port) detects movement.

      Is this possible?

      From what I understand, axp2101 "wakes up" the device on USB-connect by simply powering on the esp32. This should only work, when esp32 power supply was switched off previously. In my context, I cannot power off esp32, because it should react on PIR detection during deep-sleep.
      In my opinion, putting the esp32 in deep sleep makes it impossible to recognize switched-on USB power supply. Unfortunately, IRQ from axp2101 is not routed to esp32...
      Therefore, is my request realizable? Am I missing something?

      Thank you

      kurikoK 1 Reply Last reply Reply Quote 0
      • kurikoK
        kuriko @davincino
        last edited by

        @davincino
        i think you can get some inspiration from this sketch!
        https://github.com/m5stack/M5StickC-Plus/blob/master/examples/Advanced/IMU_Wake_On_Motion/IMU_Wake_On_Motion.ino

        Good morning, and welcome to the Black Mesa Transit System.

        D 1 Reply Last reply Reply Quote 0
        • D
          davincino @kuriko
          last edited by

          @kuriko
          Thank you for your hint. However, I don't know how it could help to solve my requirements.
          In M5StickC-Plus example, IMU will remain powered on and will send interrupt on gpio 35 on motion.
          In my requirement, axp2101 could send interrupt on power-on (usb), but its interrupt pin is not connected to esp32.
          AXP2101 usually wakes up esp32 by simply powering on esp32, it is not a real wake up by interrupt. Therefore, wake up by power-on (usb) works only if esp32 was powered off by axp2101 previously. I cannot power-off esp32 because it should also wake up on gpio interrupt from PIR.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post