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

    Deep sleep issue Timercam official firmware

    Modules
    2
    5
    4.6k
    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.
    • J
      jvdpol
      last edited by

      Hello,
      I've burned the official Timercam v1.1 firmware to the Timercam OV3660. This functions very well and the image is visible via the api interface.
      The only issue I have is that the device doesn't sleep longer than 2100 seconds (35 min). I've set the deep sleep time on 15000 seconds through the interface. The serial monitor also shows this sleep time when waking up.
      It looks like the same issue as described here: Link to same issue.
      Can I edit the firmware downloaded from the M5burner or are there other solutions to troubleshoot or solve this?

      Kind regards.

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

        Hello @jvdpol

        the issue is that the variable holding the wake_time is defined as int which overflows when converted to microseconds.

        I think this is the source code for the Timercam.

        Thanks
        Felix

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

        1 Reply Last reply Reply Quote 0
        • J
          jvdpol
          last edited by jvdpol

          Thanks @felmue for the information and pointing me to the source!
          I've edited the main.c file and tried to build and flash the code via the Espressif IDF. I'm getting a lot of errors, and i'm unable to build the code. (i'm lacking coding experience to solve it)
          According to this Youtube clip the errors may be caused by the version of the IDF. I've tried different older versions (I cannot find V4.0.3 anymore)

          Can you help me any further with this?
          Kind regards,
          Joris

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

            Hello @jvdpol

            I am using ESP-IDF v4.0.1 and cloned the repository like this:

            git clone -b v4.0.1 --recursive https://github.com/espressif/esp-idf.git
            

            then alongside I cloned the TimerCam repository and switched to timer-wake branch

            git clone https://github.com/m5stack/TimerCam-idf.git
            cd TimerCam-idf
            git checkout timer-wake
            

            Thanks
            Felix

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

            1 Reply Last reply Reply Quote 0
            • J
              jvdpol
              last edited by jvdpol

              Thanks for the support! I've managed to 'fix' it. Reinstalled the IDF with predownloaded V4.0.3 version.
              I couldn't get the uint conversion working in the main.c. It came up with a lot of errors. So I decided to go for the quick and dirty solution; hardcoded sleep timer of four hours in microseconds. Not the way it supposed to be, but it works for me ;-)

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