Deep sleep issue Timercam official firmware



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



  • 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



  • 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



  • 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



  • 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 ;-)