🤖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?

    Core 2
    2
    3
    2.7k
    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
      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
        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
          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
          • First post
            Last post