<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Display on during deep sleep?]]></title><description><![CDATA[<p dir="auto">Currently, going into deep sleep (or even light sleep) shuts down the display. I was wondering how we can get the M5stack to go in deep sleep without powering off the LCD.</p>
<p dir="auto">Say I want to display something and then keep it on for a minute, during which I don't need any CPU/WiFi/BT/etc. functionality, so those can be powered down. After a minute the CPU should boot the sketch again as if it was rebooted/awaken.</p>
<p dir="auto">This behavior was possible if I attach my own LCD to the ESP8266 and I believe it is possible with the ESP32, but why does M5stack switch off the display if I only want to make the ESP sleep? I believe the LCD should power down only if I call <code>M5.powerOFF()</code> and not when I call <code>esp_deep_sleep_start()</code>.</p>
<p dir="auto"><strong>TL;DR</strong>: how to enter deep sleep while keeping the LCD on?</p>
]]></description><link>https://community.m5stack.com/topic/596/display-on-during-deep-sleep</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Apr 2026 00:30:45 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/596.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 11 Feb 2019 14:38:07 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Display on during deep sleep? on Tue, 24 Nov 2020 14:58:46 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/andyt" aria-label="Profile: AndyT">@<bdi>AndyT</bdi></a></p>
<p dir="auto">hmm, strange, if anything I'd expected the M5Stack Gray to work with low brightness level and the M5Stack Black to not behave due to the fact that the M5Stack Gray has additional hardware (e.g. IMU) consuming power to keep the device powered on.</p>
<p dir="auto">That said, I suspect the IP5306 switching off due to too light load. Try to add the following statement before going into deep sleep. It should prevent the IP5306 from shutting down under light load.</p>
<pre><code>M5.Power.setPowerBoostKeepOn(true);
</code></pre>
<p dir="auto">Happy Stacking!<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/10851</link><guid isPermaLink="true">https://community.m5stack.com/post/10851</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Tue, 24 Nov 2020 14:58:46 GMT</pubDate></item><item><title><![CDATA[Reply to Display on during deep sleep? on Tue, 24 Nov 2020 12:08:34 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/andyt" aria-label="Profile: andyt">@<bdi>andyt</bdi></a>  I now have the M5Stack black top and a grey top. The ulp program works well to keep the Black top version backlight running at varying levels of brightness. But if i set the PWM to less than 60 on the grey top version.  The back light switches off completely after 15 seconds of sleep.  which limits the available brightness levels between 60 and 255. which makes the brightness change hardly noticeable Not sure what is going on with the differences between the two M5stacks?</p>
]]></description><link>https://community.m5stack.com/post/10850</link><guid isPermaLink="true">https://community.m5stack.com/post/10850</guid><dc:creator><![CDATA[AndyT]]></dc:creator><pubDate>Tue, 24 Nov 2020 12:08:34 GMT</pubDate></item><item><title><![CDATA[Reply to Display on during deep sleep? on Mon, 02 Nov 2020 23:35:28 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/felmue" aria-label="Profile: felmue">@<bdi>felmue</bdi></a> Thank you again for the prompt replay. Thank you for the info.  I drew a blank at the link you provide as well . Also a good find regarding the pin assignments of the hard coded SDA and SDL for channels 0,1.  Did find this link for ulp.h using I_i2C_ READ I_I2C_WRITE etc. But could not get the ZIPed Library to install into my Arduino IDE to try it out.<br />
<a href="https://github.com/espressif/esp-idf/blob/master/components/ulp/include/esp32/ulp.h" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/espressif/esp-idf/blob/master/components/ulp/include/esp32/ulp.h</a><br />
Maybe start a new thread soon on this as i am getting off the original topic here now that your ULP code above fixed the display going off while sleeping. Just for the record now getting 24hrs off two 700mh add on battery modules at  well bright 200 brightness level while the 5Stack is sleeping .</p>
]]></description><link>https://community.m5stack.com/post/10583</link><guid isPermaLink="true">https://community.m5stack.com/post/10583</guid><dc:creator><![CDATA[AndyT]]></dc:creator><pubDate>Mon, 02 Nov 2020 23:35:28 GMT</pubDate></item><item><title><![CDATA[Reply to Display on during deep sleep? on Mon, 02 Nov 2020 20:36:50 GMT]]></title><description><![CDATA[<p dir="auto">Hello Andy</p>
<p dir="auto">I am afraid you're out of luck. The <code>arduino-esp32</code> library is based on IDF release 3.3 and the ULP macros for I2C seem to be missing / not implemented yet.</p>
<p dir="auto"><code>#define OPCODE_I2C 3            /*!&lt; Instruction: read/write I2C (not implemented yet) */</code></p>
<p dir="auto">But even with the macros in place it would probably still not work. According to this <a href="https://github.com/wardjm/esp32-ulp-i2c" target="_blank" rel="noopener noreferrer nofollow ugc">info</a> it seems that the ULP only allows for two predefined sets of GPIOs to be used for SDA and SDL, none of which are GPIO21/22 used in M5Stack.</p>
<p dir="auto">Felix</p>
]]></description><link>https://community.m5stack.com/post/10581</link><guid isPermaLink="true">https://community.m5stack.com/post/10581</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Mon, 02 Nov 2020 20:36:50 GMT</pubDate></item><item><title><![CDATA[Reply to Display on during deep sleep? on Mon, 02 Nov 2020 16:07:12 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/felmue" aria-label="Profile: felmue">@<bdi>felmue</bdi></a>  Seems  my Arduino IDE  ulp.h does not have a macro I_i2c_RD. And i can't find a way to assemble the  raw assembly  instruction set  i2C_RD. Am i missing something? As i want to take advantage of the the assembly instructions and also  the latest set of Macros. Just spent a day going around the internet and came up with nothing. Trying to write ULP code to wake the  M5stack when the  battery % changes.  Sorry again to trouble you.</p>
]]></description><link>https://community.m5stack.com/post/10572</link><guid isPermaLink="true">https://community.m5stack.com/post/10572</guid><dc:creator><![CDATA[AndyT]]></dc:creator><pubDate>Mon, 02 Nov 2020 16:07:12 GMT</pubDate></item><item><title><![CDATA[Reply to Display on during deep sleep? on Sun, 01 Nov 2020 07:19:21 GMT]]></title><description><![CDATA[<p dir="auto">Hello Andy</p>
<p dir="auto">thank you very much. I am happy to hear it works to your liking.</p>
<p dir="auto">Happy Stacking!<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/10562</link><guid isPermaLink="true">https://community.m5stack.com/post/10562</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Sun, 01 Nov 2020 07:19:21 GMT</pubDate></item><item><title><![CDATA[Reply to Display on during deep sleep? on Sat, 31 Oct 2020 19:57:36 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/felmue" aria-label="Profile: felmue">@<bdi>felmue</bdi></a> Yes!! Thank you. You are a Genius. Saved me hours.  I get it !.   It's working in my code.<br />
<img src="/assets/uploads/files/1604174250922-be97bcb0-73ec-4ef4-aaf0-ad7a9a5c5df7-image.png" alt="0_1604174249013_be97bcb0-73ec-4ef4-aaf0-ad7a9a5c5df7-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.m5stack.com/post/10559</link><guid isPermaLink="true">https://community.m5stack.com/post/10559</guid><dc:creator><![CDATA[AndyT]]></dc:creator><pubDate>Sat, 31 Oct 2020 19:57:36 GMT</pubDate></item><item><title><![CDATA[Reply to Display on during deep sleep? on Sat, 31 Oct 2020 09:47:36 GMT]]></title><description><![CDATA[<p dir="auto">Hello Andy</p>
<p dir="auto">ULP code and ULP variables share the same area of RTC_SLOW_MEM which is about 8 kB. Right now your ULP variable is reset to 0 at every boot since all of that area is reset to 0 by this command: <code>memset(RTC_SLOW_MEM, 0, 8192);</code>. In addition the ULP code and your ULP variable both are located at the same offset 0 in that area. <code>ulp_process_macros_and_load(0, ulp_prog, &amp;size);</code></p>
<p dir="auto">In order to fix this the RTC_SLOW_MEM needs to be orgnanised, e.g. the ULP variables need to be located after (or before) the ULP code and the area used for ULP variables needs to be excluded from being cleared to 0 at every boot.</p>
<p dir="auto">There are many ways to solve this. In the example I've linked earlier ULP variables are located shortly after the ULP code (offset 36). The solution I've chosen puts the ULP variables into the last of the eight 1 kB blocks of RTC_SLOW_MEM. That leaves more than enough space (the first 7 kB) for ULP code.</p>
<p dir="auto">Note: Next to the boot count ULP variable I've added a second ULP dummy variable  to illustrate how multiple ULP variables could be handled.</p>
<p dir="auto">Cheers<br />
Felix</p>
<pre><code>#include &lt;M5Stack.h&gt;
#include "esp32/ulp.h"
#include "driver/rtc_io.h"

const int lcdBrightness = 50; // (1-255)

// RTC slow memory map (vars are in the last 1 kB of total 8 kB)
// Note: all ULP commands / vars are 4 bytes in size
const size_t rtc_slow_mem_total_size = 2048; // 8 kB = 4 * 2048
const size_t rtc_slow_mem_vars_space = 256;  // 1 kB = 4 * 256
const size_t rtc_slow_mem_vars_start = rtc_slow_mem_total_size - rtc_slow_mem_vars_space;
const size_t rtc_slow_mem_prog_start = 0;
const size_t rtc_slow_mem_prog_space = rtc_slow_mem_total_size - rtc_slow_mem_vars_space; // 7 kB

const size_t ulp_boot_count_var_offset = 0;
const size_t ulp_dummy_var_offset = 1;

void ulp_start(void) {
  // RTC slow mem init (except space allocated for vars)
  memset(RTC_SLOW_MEM, 0, rtc_slow_mem_prog_space * sizeof(uint32_t));
  // M5Stack LCD backlight is connected to GPIO32 (specify by +14)
  const gpio_num_t lcdPWMPin = GPIO_NUM_32;
  const int lcdPWMBit = RTCIO_GPIO32_CHANNEL + 14;
  // GPIO32 initialization (set to output and initial value is 0)
  rtc_gpio_init(lcdPWMPin);
  rtc_gpio_set_direction(lcdPWMPin, RTC_GPIO_MODE_OUTPUT_ONLY);
  rtc_gpio_set_level(lcdPWMPin, 0);
  // Define ULP program
  const ulp_insn_t ulp_prog[] = {
    M_LABEL(1),
    I_WR_REG(RTC_GPIO_OUT_REG, lcdPWMBit, lcdPWMBit, 1), // on
    I_DELAY(lcdBrightness * 100),
    I_WR_REG(RTC_GPIO_OUT_REG, lcdPWMBit, lcdPWMBit, 0), // off
    I_DELAY(25500),
    M_BX(1),
  };
  // Run ULP program
  size_t size = sizeof(ulp_prog) / sizeof(ulp_insn_t);

  ulp_process_macros_and_load(rtc_slow_mem_prog_start, ulp_prog, &amp;size);
  ulp_run(rtc_slow_mem_prog_start);
}

void setup() {
  M5.begin(true, false, true, false);
  M5.Power.begin();
  M5.Lcd.println("Put something onto the LCD...");

  if(esp_sleep_get_wakeup_cause() == ESP_SLEEP_WAKEUP_TIMER)
  {
    M5.Lcd.println("Woken from timer");
    RTC_SLOW_MEM[rtc_slow_mem_vars_start + ulp_boot_count_var_offset]++;
  }
  else
  {
    M5.Lcd.println("Woken after reset");
    RTC_SLOW_MEM[rtc_slow_mem_vars_start + ulp_boot_count_var_offset] = 0;
    RTC_SLOW_MEM[rtc_slow_mem_vars_start + ulp_dummy_var_offset] = 4711;
  }
  M5.Lcd.println(RTC_SLOW_MEM[rtc_slow_mem_vars_start + ulp_boot_count_var_offset]);
  M5.Lcd.println(RTC_SLOW_MEM[rtc_slow_mem_vars_start + ulp_dummy_var_offset]);

  ulp_start();

  M5.Lcd.println("Going to deep sleep");
  esp_sleep_enable_timer_wakeup(5000);
  esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_PERIPH, ESP_PD_OPTION_ON);
  esp_deep_sleep_start();
}

void loop() {
}
</code></pre>
]]></description><link>https://community.m5stack.com/post/10553</link><guid isPermaLink="true">https://community.m5stack.com/post/10553</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Sat, 31 Oct 2020 09:47:36 GMT</pubDate></item><item><title><![CDATA[Reply to Display on during deep sleep? on Thu, 29 Oct 2020 16:42:04 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/andyt" aria-label="Profile: andyt">@<bdi>andyt</bdi></a>  coming From a background of coding 8bit PIC's etc, I have a fare grip on assembler language. So once i get to grips with this ULP coding  methods . My next step will be to add a routine to check battery level% change and wake from sleep  to update the LCD battery level icon. As at the moment while it is sleeping with the LCD on the M5stack could run out of power and shut down. Or stay displaying the wrong battery level  while it sleeps  as at the moment  it only updates while awake.  Just need to get my head around the fundamentals of data handling and storage and setup of ULP.  Good that there is more info on this topic these days. Exciting times!!![<br />
My M5stack waking up and quickly turning on wifi,  grabbing my local environment agency river levels .and showing the levels  and if they are rising or falling triggering speaker alarms  and displaying waring icons when reaching or above flood levels. To conserve battery it is asleep while the backlight remains on at a duty cycle dependant on battery level. Getting dimmer as the battery % lowers for 10 minutes minimum and then display the weather forecast from a weather API. cycling through these screens quicker or slower depending on the level of importance to the viewer. So while the river levels are low the weather will be displayed longer. pressing one of the front buttons wakes the device and scrolls to the next page, so that the user can look through the pages at a glance.  It's like doing a painting. Always improving to the code to finished slick working device. next stage is to right a nice routine for a user interface to input their own wifi and postcode location. So the device can select local levels and weather.</p>
]]></description><link>https://community.m5stack.com/post/10532</link><guid isPermaLink="true">https://community.m5stack.com/post/10532</guid><dc:creator><![CDATA[AndyT]]></dc:creator><pubDate>Thu, 29 Oct 2020 16:42:04 GMT</pubDate></item><item><title><![CDATA[Reply to Display on during deep sleep? on Thu, 29 Oct 2020 15:55:09 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/felmue" aria-label="Profile: felmue">@<bdi>felmue</bdi></a>  Thanks for the link. Lot of code to sift through , spent hours trying to get clues from it. Tried snipets of code out of it, But still can't fully understand what' the problem is. I think i am missing a fundamental principle, how after a SLEEP the esp32 loads all it's variables which would include<br />
RTC_DATA_ATTR int bootCount = 0;<br />
So no wonder it is 0 when the main loop runs, as it is always being set to 0 on wake up. So confused about this from the outset the code even worked in the first place.<br />
But it did work until i  introduced the ULP program to PWM a GPIO while sleeping to keep my esp32 M5Stack LCD back light pin operating.<br />
if I don't call the ulp_start(void) routine before sleeping then the ++bootCount  increments on each wake just fine.<br />
Why is the below code effecting the RTC_DATA_ATTR int bootCount = 0; ???<br />
what do i need to add to fix it?<br />
I am using the Arduino IDE. So maybe there is an issue on where the Config is assigning the RTC_ to fast or slow ULP memory. I really can't fathom it out. why calling ulp_start(void) resets my counter to 0. Please give me an explanation and solution. Cheers Andy<br />
void ulp_start(void) {<br />
// Slow memory initialization<br />
memset(RTC_SLOW_MEM, 0, 8192);<br />
// M5Stack LCD backlight is connected to GPIO32 (specify by +14)<br />
const gpio_num_t lcdPWMPin = GPIO_NUM_32;<br />
const int lcdPWMBit = RTCIO_GPIO32_CHANNEL + 14;<br />
// GPIO32 initialization (set to output and initial value is 0)<br />
rtc_gpio_init(lcdPWMPin);<br />
rtc_gpio_set_direction(lcdPWMPin, RTC_GPIO_MODE_OUTPUT_ONLY);<br />
rtc_gpio_set_level(lcdPWMPin, 0);<br />
// Define ULP program<br />
const ulp_insn_t  ulp_prog[] = {<br />
M_LABEL(1),<br />
I_WR_REG(RTC_GPIO_OUT_REG, lcdPWMBit, lcdPWMBit, 1), // on<br />
I_DELAY(lcdBrightness * 100),<br />
I_WR_REG(RTC_GPIO_OUT_REG, lcdPWMBit, lcdPWMBit, 0), // off<br />
I_DELAY(25500),<br />
M_BX(1),<br />
};<br />
// Run ULP program<br />
size_t size = sizeof(ulp_prog) / sizeof(ulp_insn_t);<br />
ulp_process_macros_and_load(0, ulp_prog, &amp;size);<br />
ulp_run(00);<br />
}</p>
]]></description><link>https://community.m5stack.com/post/10528</link><guid isPermaLink="true">https://community.m5stack.com/post/10528</guid><dc:creator><![CDATA[AndyT]]></dc:creator><pubDate>Thu, 29 Oct 2020 15:55:09 GMT</pubDate></item><item><title><![CDATA[Reply to Display on during deep sleep? on Thu, 29 Oct 2020 10:54:28 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/andyt" aria-label="Profile: AndyT">@<bdi>AndyT</bdi></a></p>
<p dir="auto">please have a look at the following example which stores variables after the ULP code: <a href="https://github.com/espressif/esp-idf/blob/357a2776032299b8bc4044900a8f1d6950d7ce89/examples/system/deep_sleep/main/deep_sleep_example_main.c" target="_blank" rel="noopener noreferrer nofollow ugc">deep sleep example</a></p>
<p dir="auto">Cheers<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/10521</link><guid isPermaLink="true">https://community.m5stack.com/post/10521</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Thu, 29 Oct 2020 10:54:28 GMT</pubDate></item><item><title><![CDATA[Reply to Display on during deep sleep? on Wed, 28 Oct 2020 15:25:16 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/felmue" aria-label="Profile: felmue">@<bdi>felmue</bdi></a> Thanks for the above routine. Works well. However i was storing a RTC_bootCount  so i could display a sequence of images on the screen after waking from sleep. However it seem the ulp over rights the bootCounter stored there. How do i need to change the above code to preserve the RTC_bootCounter?<br />
i tried this but never worked, I am new a ULP coding, so not sure how to locate a free memory space in ULP memory. and retrive it back into the main routine.<br />
// Define ULP program<br />
const ulp_insn_t  ulp_prog[] = {<br />
I_ST(ulp_bootCount, R0, 0),        //  trying to store my bootCounter<br />
M_LABEL(1),<br />
I_WR_REG(RTC_GPIO_OUT_REG, lcdPWMBit, lcdPWMBit, 1), // on<br />
I_DELAY(lcdBrightness * 100),<br />
I_WR_REG(RTC_GPIO_OUT_REG, lcdPWMBit, lcdPWMBit, 0), // off<br />
I_DELAY(25500),<br />
M_BX(1),<br />
};<br />
and in my main code use ++ulp_bootCounter;<br />
please help . Thanks AndyT</p>
]]></description><link>https://community.m5stack.com/post/10517</link><guid isPermaLink="true">https://community.m5stack.com/post/10517</guid><dc:creator><![CDATA[AndyT]]></dc:creator><pubDate>Wed, 28 Oct 2020 15:25:16 GMT</pubDate></item><item><title><![CDATA[Reply to Display on during deep sleep? on Wed, 22 Jul 2020 18:35:24 GMT]]></title><description><![CDATA[<p dir="auto">Hello all</p>
<p dir="auto">the reason nothing can be seen on the LCD during deep sleep is that the backlight is off. The LCD backlight is driven by GPIO32 (PWM) which is stopped when the ESP32 goes into deep sleep. Luckily GPIO32 can be controlled by the Ultra Low Processor (ULP) too. Below is a small test program which implements PWM for GPIO32 with ULP C macros / assembler.</p>
<p dir="auto">Cheers<br />
Felix</p>
<pre><code>#include &lt;M5Stack.h&gt;
#include "esp32/ulp.h"
#include "driver/rtc_io.h"

const int lcdBrightness = 1; // (1-255)

void ulp_start(void) {
  // Slow memory initialization
  memset(RTC_SLOW_MEM, 0, 8192);
  // M5Stack LCD backlight is connected to GPIO32 (specify by +14)
  const gpio_num_t lcdPWMPin = GPIO_NUM_32;
  const int lcdPWMBit = RTCIO_GPIO32_CHANNEL + 14;
  // GPIO32 initialization (set to output and initial value is 0)
  rtc_gpio_init(lcdPWMPin);
  rtc_gpio_set_direction(lcdPWMPin, RTC_GPIO_MODE_OUTPUT_ONLY);
  rtc_gpio_set_level(lcdPWMPin, 0);
  // Define ULP program
  const ulp_insn_t  ulp_prog[] = {
    M_LABEL(1),
    I_WR_REG(RTC_GPIO_OUT_REG, lcdPWMBit, lcdPWMBit, 1), // on
    I_DELAY(lcdBrightness * 100),
    I_WR_REG(RTC_GPIO_OUT_REG, lcdPWMBit, lcdPWMBit, 0), // off
    I_DELAY(25500),
    M_BX(1),
  };
  // Run ULP program
  size_t size = sizeof(ulp_prog) / sizeof(ulp_insn_t);
  ulp_process_macros_and_load(0, ulp_prog, &amp;size);
  ulp_run(0);
}

void setup() {
  M5.begin(true, false, true, false);
  M5.Power.begin();
  M5.Lcd.println("Put something onto the LCD...");
  ulp_start();
  M5.Lcd.println("Going to deep sleep");
  esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_PERIPH, ESP_PD_OPTION_ON);
  esp_deep_sleep_start();
}

void loop() {
}
</code></pre>
]]></description><link>https://community.m5stack.com/post/9408</link><guid isPermaLink="true">https://community.m5stack.com/post/9408</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Wed, 22 Jul 2020 18:35:24 GMT</pubDate></item><item><title><![CDATA[Reply to Display on during deep sleep? on Thu, 16 Apr 2020 21:10:17 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/m5er" aria-label="Profile: m5er">@<bdi>m5er</bdi></a>  During deep sleep the LCD background led draws(a lot of) current. Also you have to refresh your screen 50 times per second<br />
The only solution to your problem would be adding an e-ink display which doesn't need any refresh during deep_sleep.</p>
]]></description><link>https://community.m5stack.com/post/8178</link><guid isPermaLink="true">https://community.m5stack.com/post/8178</guid><dc:creator><![CDATA[crami25]]></dc:creator><pubDate>Thu, 16 Apr 2020 21:10:17 GMT</pubDate></item><item><title><![CDATA[Reply to Display on during deep sleep? on Thu, 16 Apr 2020 19:39:52 GMT]]></title><description><![CDATA[<p dir="auto">Hey <a class="plugin-mentions-user plugin-mentions-a" href="/user/pierred" aria-label="Profile: pierred">@<bdi>pierred</bdi></a> and <a class="plugin-mentions-user plugin-mentions-a" href="/user/crami25" aria-label="Profile: crami25">@<bdi>crami25</bdi></a> - no offense, but it looks like you are hijacking this thread to discuss a different topic, i.e. how to wake from sleep. The original topic of this thread is "<strong>how to enter deep sleep while keeping the LCD on</strong>". This is still not solved and I doubt that it will ever be.</p>
]]></description><link>https://community.m5stack.com/post/8177</link><guid isPermaLink="true">https://community.m5stack.com/post/8177</guid><dc:creator><![CDATA[m5er]]></dc:creator><pubDate>Thu, 16 Apr 2020 19:39:52 GMT</pubDate></item><item><title><![CDATA[Reply to Display on during deep sleep? on Thu, 26 Mar 2020 17:04:48 GMT]]></title><description><![CDATA[<p dir="auto">Hello Crami25,</p>
<p dir="auto">Thank you for your help.<br />
I took the time to try, to test.</p>
<p dir="auto">For sleep, it's OK.<br />
I made a small example but it doesn't work every time ???</p>
<p dir="auto">On the other hand, I wish to wake up with the buttons.<br />
I've searched the schematics:<br />
Button A GPIO39<br />
Button B GPIO38<br />
Button C GPIO37</p>
<p dir="auto">Following the example of this site:<br />
<a href="https://randomnerdtutorials.com/esp32-external-wake-up-deep-sleep/" target="_blank" rel="noopener noreferrer nofollow ugc">https://randomnerdtutorials.com/esp32-external-wake-up-deep-sleep/</a></p>
<p dir="auto">ext0<br />
In this example, the ESP32 wakes up when the GPIO 33 is triggered to high:</p>
<p dir="auto">esp_sleep_enable_ext0_wakeup(GPIO_NUM_33,1); //1 = High, 0 = Low<br />
Instead of GPIO 33, you can use any other RTC GPIO pin.</p>
<p dir="auto">#include &lt;M5Stack.h&gt;</p>
<p dir="auto">#define uS_TO_S_FACTOR 1000000  /* Conversion factor for micro seconds to seconds <em>/<br />
#define TIME_TO_SLEEP  10        /</em> Time ESP32 will go to sleep (in seconds) */<br />
//#define BUTTON_PIN_BITMASK 0x8000000000</p>
<p dir="auto">void setup()<br />
{<br />
Serial.begin(115200);<br />
M5.begin(true, false, true);<br />
esp_sleep_enable_timer_wakeup(TIME_TO_SLEEP * uS_TO_S_FACTOR);<br />
Serial.println("Setup ESP32 to sleep for every " + String(TIME_TO_SLEEP) + " Seconds");</p>
<p dir="auto">esp_sleep_enable_ext0_wakeup(GPIO_NUM_39,0); //1 = High, 0 = Low</p>
<p dir="auto">//esp_deep_sleep_start(); //entre en someil profond</p>
<p dir="auto">}</p>
<p dir="auto">void loop() {</p>
<p dir="auto">M5.update();// update button state</p>
<p dir="auto">if (M5.BtnA.wasReleased())<br />
{<br />
esp_sleep_enable_ext0_wakeup(GPIO_NUM_39,0); //1 = High, 0 = Low<br />
}</p>
<p dir="auto">if (M5.BtnB.wasReleased())<br />
{<br />
esp_deep_sleep_start(); //entre en someil profond<br />
}</p>
<p dir="auto">if (M5.BtnC.wasReleased())<br />
{<br />
M5.Lcd.fillScreen(WHITE);<br />
M5.Lcd.setTextColor(BLUE);<br />
M5.Lcd.setBrightness(100);<br />
M5.Lcd.setTextSize(2);<br />
M5.Lcd.setCursor(40, 60);<br />
M5.Lcd.print("Temperature: ");<br />
}<br />
}</p>
]]></description><link>https://community.m5stack.com/post/7915</link><guid isPermaLink="true">https://community.m5stack.com/post/7915</guid><dc:creator><![CDATA[PierreD]]></dc:creator><pubDate>Thu, 26 Mar 2020 17:04:48 GMT</pubDate></item><item><title><![CDATA[Reply to Display on during deep sleep? on Sun, 22 Mar 2020 20:07:37 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/pierred" aria-label="Profile: PierreD">@<bdi>PierreD</bdi></a></p>
<p dir="auto">Random Nerd Tutorials published by Rui and Sara Santos have a tutorial  how to use the deep sleep mode on the ESP32and how to store data in the RTC memory:</p>
<p dir="auto"><a href="https://randomnerdtutorials.com/esp32-timer-wake-up-deep-sleep/" target="_blank" rel="noopener noreferrer nofollow ugc">https://randomnerdtutorials.com/esp32-timer-wake-up-deep-sleep/</a></p>
<p dir="auto">I havn't tried it out yet, but it probably should also work with the M5Stack ESP32.</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/pierred" aria-label="Profile: PierreD">@<bdi>PierreD</bdi></a> Tu trouves une code exemplaire de programmation pour le sub-ordnateur ESP32-RTC  au site de Rui et Sara Santos à   <a href="https://randomnerdtutorials.com/esp32-timer-wake-up-deep-sleep/" target="_blank" rel="noopener noreferrer nofollow ugc">https://randomnerdtutorials.com/esp32-timer-wake-up-deep-sleep/</a></p>
<p dir="auto">bonne chance  crami25</p>
]]></description><link>https://community.m5stack.com/post/7866</link><guid isPermaLink="true">https://community.m5stack.com/post/7866</guid><dc:creator><![CDATA[crami25]]></dc:creator><pubDate>Sun, 22 Mar 2020 20:07:37 GMT</pubDate></item><item><title><![CDATA[Reply to Display on during deep sleep? on Sun, 22 Mar 2020 18:37:21 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/m5er" aria-label="Profile: m5er">@<bdi>m5er</bdi></a> said in <a href="/post/3586">Display on during deep sleep?</a>:</p>
<blockquote>
<p dir="auto">dernières valeurs et se réveille toutes les X minutes pour mettre à jour les mesures; affichage du nombre d'abonnés twitter, de likes, de visites de pages, etc. Dans tous ces cas d'utilisation, il est utile de laisser le CPU dormir la plupart du temps pendant que l'affichage reste allumé.<br />
Dans tous les cas, ce serait bien si quelqu'un pouvait présenter une solution de travail. Ce n'est probablement que quelques lignes de code, mais je n'arrive pas à trouver les bonnes.</p>
</blockquote>
<p dir="auto">Hello,</p>
<p dir="auto">I'm editing this old post... Do you have a solution?</p>
<p dir="auto">Pierre</p>
]]></description><link>https://community.m5stack.com/post/7864</link><guid isPermaLink="true">https://community.m5stack.com/post/7864</guid><dc:creator><![CDATA[PierreD]]></dc:creator><pubDate>Sun, 22 Mar 2020 18:37:21 GMT</pubDate></item><item><title><![CDATA[Reply to Display on during deep sleep? on Sun, 07 Apr 2019 16:02:15 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/m5er" aria-label="Profile: m5er">@<bdi>m5er</bdi></a></p>
<p dir="auto">Thank you.<br />
What some people dont know is that the esp32 is not like an arduino.<br />
the esp32 has 3 cores, 2 primary and 1 Ultra Low power.<br />
In true deep sleep, the primary core are deactivated and the basic "Upkeep" code is off loaded to the ULP.<br />
Because the M5Stack is based on the ESP32 and not much is understood about the ULP, very little progress has been made on deep sleep.<br />
In theory, from what I have read the ULP could maintain a low power screen for a Like (to use your example) and then wake up the core to take the sensor measurements before storing them (for the ulp to recall and display) putting the cores back to sleep.</p>
<p dir="auto">If you are interested in leaning more, look into the ESP32's ULP (Ultra Low Power core)</p>
]]></description><link>https://community.m5stack.com/post/3587</link><guid isPermaLink="true">https://community.m5stack.com/post/3587</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Sun, 07 Apr 2019 16:02:15 GMT</pubDate></item><item><title><![CDATA[Reply to Display on during deep sleep? on Sun, 07 Apr 2019 15:53:58 GMT]]></title><description><![CDATA[<p dir="auto">I agree with <a class="plugin-mentions-user plugin-mentions-a" href="/user/ajb2k3" aria-label="Profile: ajb2k3">@<bdi>ajb2k3</bdi></a> that M5Stack is a young project, so that indeed explains the lack of such queries. However, I don't think my use case is unusual - I can think of a lot of applications that would benefit from sleeping while the display is on, such as: a clock showing hours and minutes only (so waking up only once a minute); sensor monitoring application (e.g. temperature, humidity, etc.) that constantly displays the latest values and wakes up once each X minutes to update measurements; displaying the number of twitter followers, likes, page visits, etc. In all these use cases it is useful to have the CPU sleep most of the time while the display remains on.</p>
<p dir="auto">In any case, it would be great if someone can present a working solution. It is probably just a few lines of code, but I just can't seem to get the right ones.</p>
]]></description><link>https://community.m5stack.com/post/3586</link><guid isPermaLink="true">https://community.m5stack.com/post/3586</guid><dc:creator><![CDATA[m5er]]></dc:creator><pubDate>Sun, 07 Apr 2019 15:53:58 GMT</pubDate></item><item><title><![CDATA[Reply to Display on during deep sleep? on Fri, 05 Apr 2019 11:43:27 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/m5er" aria-label="Profile: m5er">@<bdi>m5er</bdi></a> said in <a href="/post/3544">Display on during deep sleep?</a>:</p>
<blockquote>
<p dir="auto">I can't believe this problem has no solution: keeping the display of M5stack ON during light or deep sleep. It should be trivial and yet no one on this forum can present a working solution. This seems to be an impossible task!</p>
</blockquote>
<p dir="auto">The reason no solution exist is because having the screen on goes against the purpose of deep sleep and also because it’s such an unusual question that you have asked, no one has yet to think of a solution in the esp32 world.</p>
<p dir="auto">Please be patient, M5Stack is still a young project and not everything is thought off until the end user posses a query. If you discover a way to do please let us know but in the mean time please continue to wait patiently.</p>
]]></description><link>https://community.m5stack.com/post/3554</link><guid isPermaLink="true">https://community.m5stack.com/post/3554</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Fri, 05 Apr 2019 11:43:27 GMT</pubDate></item><item><title><![CDATA[Reply to Display on during deep sleep? on Thu, 04 Apr 2019 19:19:04 GMT]]></title><description><![CDATA[<p dir="auto">I can't believe this problem has no solution: keeping the display of M5stack ON during light or deep sleep. It should be trivial and yet no one on this forum can present a working solution. This seems to be an impossible task!</p>
]]></description><link>https://community.m5stack.com/post/3544</link><guid isPermaLink="true">https://community.m5stack.com/post/3544</guid><dc:creator><![CDATA[m5er]]></dc:creator><pubDate>Thu, 04 Apr 2019 19:19:04 GMT</pubDate></item><item><title><![CDATA[Reply to Display on during deep sleep? on Fri, 15 Feb 2019 15:28:55 GMT]]></title><description><![CDATA[<p dir="auto">Is there a solution to this problem? I find it really strange that we can't have the display on during light/deep sleep. This harms all kinds of low-power applications that rely on a screen.</p>
]]></description><link>https://community.m5stack.com/post/3035</link><guid isPermaLink="true">https://community.m5stack.com/post/3035</guid><dc:creator><![CDATA[m5er]]></dc:creator><pubDate>Fri, 15 Feb 2019 15:28:55 GMT</pubDate></item></channel></rss>