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

    M5StickC and ULP wakeup

    Scheduled Pinned Locked Moved PROJECTS
    2 Posts 2 Posters 4.1k Views 1 Watching
    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.
    • S Offline
      sharek
      last edited by

      When I try to program the ULP and enable esp_sleep_enable_ulp_wakeup();

      I use the following code with esp_sleep_enable before M5.Deepsleep()

        esp_sleep_enable_ext0_wakeup(GPIO_NUM_37, LOW); // button A 1 = High, 0 = Low
      #define BUTTON_PIN_BITMASK 0x8000000000 // 2^39 in hex (button B)
        esp_sleep_enable_ext1_wakeup(BUTTON_PIN_BITMASK, ESP_EXT1_WAKEUP_ALL_LOW);
        esp_sleep_enable_timer_wakeup(takeSampleTime);
        esp_sleep_enable_ulp_wakeup(); // conflict with ext0/ext1/touch/ulp?
      

      If I use ButtonA&ButtonB wake EXT0 and EXT1 on the log the ESP tells me something like:

      E (16967) sleep: Conflicting wake-up trigger: ext0
      

      And If I disable the buttons wakeup, also tells me about GPIO TOUCH conflict :(

      What are the steps to get button wakeup, timer wakeup and ULP wakeup at same time?

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

        Hello @sharek

        you don't need both ext0 and ext1 for the two buttons. You should be able to cover both buttons with ext1 by adding both to the bitmask:

        #define BUTTON_PIN_BITMASK ((1UL << 37) | (1UL << 39))
        

        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