ESP32 deep sleep wakestub i2c EEPROM access and wake with timer

dovov97815
Posts: 22
Joined: Mon Aug 17, 2020 10:24 am

ESP32 deep sleep wakestub i2c EEPROM access and wake with timer

Postby dovov97815 » Mon Aug 17, 2020 10:30 am

Hello,
My goal is to wake up ESP32 from deep sleep on time basis and also wants to count gpio wake interrupt count, if count is maximum than setted value or timer interrupt occurs rhen ESP32 needs to go to main run mode, otherwise it should remain in deep sleep. I want to know that how to configure wakestub functions to read/write I2C EEPROM and also manage wake time, like every 24 hours.

Thank You
Devov

lbernstone
Posts: 726
Joined: Mon Jul 22, 2019 3:20 pm

Re: ESP32 deep sleep wakestub i2c EEPROM access and wake with timer

Postby lbernstone » Mon Aug 17, 2020 2:45 pm

Rewriting the wake stubs requires recompilation of the arduino libraries, and a strong knowledge of the hardware.
Even if you do that, it is not possible to access I2C within the stub.
Any processing you wish to do during sleep can only be done with the ULP (the main processor is asleep)
Waking from deep sleep via rtc timer has a good example.
https://github.com/espressif/arduino-es ... /DeepSleep
https://github.com/lbernstone/NTP_sleep

dovov97815
Posts: 22
Joined: Mon Aug 17, 2020 10:24 am

Re: ESP32 deep sleep wakestub i2c EEPROM access and wake with timer

Postby dovov97815 » Tue Aug 18, 2020 4:39 am

Thanks for response
I used a wakestub https://gist.github.com/igrr/54f7fbe051 ... d7fbecfeab in arduino and it works. but I didn't know how to configure this to work as both Pulse counting and time based wakeup.
If I can't access I2C then, its ok, but can I acheive pulse count and time based wakeup.

Thank You

Who is online

Users browsing this forum: No registered users and 27 guests