Automatic Light Sleeping during long spi transactions and Gpio states

RMandR
Posts: 75
Joined: Mon Oct 29, 2018 3:13 pm

Automatic Light Sleeping during long spi transactions and Gpio states

Postby RMandR » Mon Jun 01, 2020 6:00 pm

ePaper panels have a fairly long update delays (1 to > 4 seconds). It would be nice conserve power during the wait.

When I enable automatic light sleep, esp32 is no longer able to communicate with the ePaper panel. My guess is that the GPIO pins either float during sleep or go to 0 including the reset pin to the ePaper and mess things up.

I tried using

Code: Select all

gpio_hold_en(gpio_num_t gpio_num)
to hold the gpio control lines to the ePaper module during sleep.

Did this by calling

Code: Select all

gpio_hold_en(gpio_num_t gpio_num)
before delay operations that can lead to light_sleep and

Code: Select all

gpio_hold_dis(gpio_num_t gpio_num)
after.

The confusing bit in the docs is that https://docs.espressif.com/projects/esp ... gpio_num_t only talks about deep sleep behaviour of

Code: Select all

gpio_hold_dis(gpio_num_t gpio_num)
and not light sleep


I'm also not sure what would happen to the SPI lines and config power wake up from light sleep.

Thanks!

User avatar
fasani
Posts: 197
Joined: Wed Jan 30, 2019 12:00 pm
Location: Barcelona
Contact:

Re: Automatic Light Sleeping during long spi transactions and Gpio states

Postby fasani » Mon Jun 22, 2020 9:04 am

I'm also interested to know more about this.

One question though, reading the manual it says:
In light sleep mode, digital peripherals, most of the RAM, and CPUs are clock-gated, and supply voltage is reduced.

That if I understood well is that SPI transmission stops right, but after you send the Pixel buffer to an epaper, and the update command...supposely, it should render provided that the 3.3 v supply is still there.
However it calls my attention, that after the update that as you mention takes about 2-4 seconds, usually most components send the display module to sleep. Avoiding to that will make consumption even bigger, surpassing the 4 seconds savings you are mentioning (In my humble opinion)

Just because is related, I wanted to invite you also to test my ESP-IDF component for epaper, where you can customize in detail any of this SPI communication and modify it per display model easily:
https://github.com/martinberlin/cale-idf - Full test implementation with BMP download

https://github.com/martinberlin/CalEPD - Just the ESP-IDF component (Note: Needs Adafruit GFX in order to use Fonts/Geometric functions)
epdiy collaborator | http://fasani.de Fan of Espressif MCUs and electronic design

Who is online

Users browsing this forum: kobylin and 108 guests