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

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


  • 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.