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

    Program runs on StickC but won't turn back on after power cycle

    M5 Stick/StickC
    2
    2
    4.5k
    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.
    • P
      patf
      last edited by

      I have a large program which I developed on a TinyPico, and now want to run it on the StickC.

      It runs fine on M5StickC after flashing the first time. If I turn the stick off by holding the power button for > 6 seconds, it turns off ok. My problem is, if I then use the same button it will not turn back on. I've tried for a brief press, and up also > 2 seconds.

      If I reflash the same program, it will not start.

      The only way I can get it to run again is to flash any of the example Stick C programs, then flash my program again and it works until I power down again. My program does not use #include <M5StickC.h>. Does my program need to include this file and instantiate M5.begin(); for the power button to work ok?

      Thanks!

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

        Hello @patf

        I just ran a test with an empty program (empty setup and loop functions) and yes, with that M5StickC can be turned off, but not turned on again via power button.

        Including M5StickC.h and instantiate M5.begin() fixes the power button and the device can be turned on again with a short press.

        Background info: M5.begin() calls M5.Apx.begin() which then properly sets up the PMU AXP192 chip in the M5StackC.

        Cheers
        Felix

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

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