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

    Is machine.deepsleep() possible with a Core 2?

    Scheduled Pinned Locked Moved Core 2
    3 Posts 2 Posters 3.9k Views 2 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.
    • greenleafG Offline
      greenleaf
      last edited by greenleaf

      I have a Core 2 for AWS but figured the base hardware is the same so this should apply to the Core 2 as well.

      When I tried to do a machine.deepsleep(10000) the device just goes into a boot loop. It doesn't wait ten seconds. Seems like it might be trying to go to sleep then immediately restarting.

      Anyone have deepsleep working on a Core 2 device?

      It definitely gets the deepsleep signal, this is what I see in the serial output

      rst:0x5 (DEEPSLEEP_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
      configsip: 0, SPIWP:0xee
      clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
      mode:DIO, clock div:1
      load:0x3fff0018,len:4
      load:0x3fff001c,len:5228
      load:0x40078000,len:13424
      load:0x40080400,len:3568
      entry 0x4008063c
      
             _  __ _               
       _   _(_)/ _| | _____      __
      | | | | | |_| |/ _ \ \ /\ / /
      | |_| | |  _| | (_) \ V  V / 
       \__,_|_|_| |_|\___/ \_/\_/  
      
      1 Reply Last reply Reply Quote 0
      • felmueF Offline
        felmue
        last edited by

        Hello @greenleaf

        works fine here with:

        from m5stack import *
        from m5stack_ui import *
        from uiflow import *
        import machine
        
        screen = M5Screen()
        screen.clean_screen()
        screen.set_screen_bg_color(0xFFFFFF)
        
        machine.deepsleep(10000)
        

        When I run this code from UIFlow the screen goes white and after about 10 seconds M5Core2 restarts and connects back to UIFlow. Not sure why in your case it doesn't wait 10 seconds. Do you have the latest UIFlow firmware 1.10.2 installed on your M5Core2?

        Thanks
        Felix

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

        greenleafG 1 Reply Last reply Reply Quote 0
        • greenleafG Offline
          greenleaf @felmue
          last edited by

          @felmue I think I found the issue; my deepsleep() call was inside a loop. Moving it outside the loop sorted it out.

          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