Navigation

    M5Stack Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. dov
    D
    • Continue chat with dov
    • Start new chat with dov
    • Flag Profile
    • Profile
    • Following
    • Followers
    • Blocks
    • Topics
    • Posts
    • Best
    • Groups
    Save
    Saving

    dov

    @dov

    0
    Reputation
    1
    Posts
    65
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    dov Follow

    Posts made by dov

    • M5Paper wakeup cause

      Hello,

      I'm playing around with the M5Paper RTC and I'm stuck on differentiating between a restart caused by pressing the reset button, and a restart caused by a shutdown() with a RTC IRQ wakeup.

      I'm writing a simple clock application that updates once a minute with the following properties:

      • On boot I paint a decorative frame (I actually pull it by http), connect to ntp and setup the RTC clock. Finally I draw the time, and do a shutdown(60) to wake up in a minute.
      • After a minute I want to wake up, draw the time, and go back to sleep.

      So I did all the initialization in setup() and initialized the RTC, setup the font cache, and then went to sleep for 60s. But when I wake up after 60s I need to know whether the RTC has already been initialized, and whether I have already painted the clock frame. Right now I do all the setup once a minute.

      The ESP itself has a wake up "reason". But how would I access it on the M5Paper? And does it work in the context of the BM8563 RTC?

      Thanks!

      posted in Cores
      D
      dov