<?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[CoreInk wakeup from USB power]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">I just received a new batch of CoreInk with MAC addresses starting with <code>4C</code> and on this batch, if the device is put in deepsleep (with the Arduino <code>shtodown</code> function from the M5Stack library) the device will not wake up when the power (via the USB-C connector) is applied.</p>
<p dir="auto">Most of my previous batches had MAC addresses starting with <code>94</code> that would properly wake up when the power (via the USB-C connector) is applied.</p>
<p dir="auto">I tested the exact same code on both batch.</p>
<p dir="auto">For example, this one failed to power back up when the power is connected after an M5.shutdown:</p>
<pre><code>Chip is ESP32-PICO-D4 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, Embedded Flash, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 4c:75:25:97:98:7c
</code></pre>
<p dir="auto">And this one worked:</p>
<pre><code>Chip is ESP32-PICO-D4 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, Embedded Flash, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 94:b9:7e:92:b3:8c
</code></pre>
<p dir="auto">Any idea or software workaround ?</p>
<p dir="auto">Thanks.</p>
]]></description><link>https://community.m5stack.com/topic/4332/coreink-wakeup-from-usb-power</link><generator>RSS for Node</generator><lastBuildDate>Fri, 01 May 2026 12:37:34 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/4332.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 31 May 2022 23:46:37 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to CoreInk wakeup from USB power on Mon, 25 Jul 2022 18:01:14 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/indianatux" aria-label="Profile: IndianaTux">@<bdi>IndianaTux</bdi></a></p>
<p dir="auto">does that work with real loads (and not just the multimeter) attached to the output? I am asking because it looks like the MOSFET keeps conducting after <code>M5.shudown()</code> is called  and only putting ESP32 into deep sleep (and by doing so reducing the current) makes the MOSFET to finally open. If my thinking is correct a real load on the output would keep the current high and thus the MOSFET closed. (I hope I am wrong.)</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/18056</link><guid isPermaLink="true">https://community.m5stack.com/post/18056</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Mon, 25 Jul 2022 18:01:14 GMT</pubDate></item><item><title><![CDATA[Reply to CoreInk wakeup from USB power on Mon, 25 Jul 2022 16:45:22 GMT]]></title><description><![CDATA[<p dir="auto">Ok further testing and it seems like if I do:</p>
<pre><code>    M5.shutdown();
    esp_deep_sleep_start();
</code></pre>
<p dir="auto">I'm getting what I expect as a behavior for a shutdown. When running on battery doing these 3 commands makes ESP-32 shut down and the output 5v and 3.3v drop to 0v. And connecting power to the USB-C connector makes the ESP-32 boot back.</p>
]]></description><link>https://community.m5stack.com/post/18054</link><guid isPermaLink="true">https://community.m5stack.com/post/18054</guid><dc:creator><![CDATA[IndianaTux]]></dc:creator><pubDate>Mon, 25 Jul 2022 16:45:22 GMT</pubDate></item><item><title><![CDATA[Reply to CoreInk wakeup from USB power on Mon, 25 Jul 2022 16:21:57 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>  I finally got around to testing this on a 94 and 4C MAC address CoreInk and there is still a big difference.</p>
<p dir="auto">I used the same code I used before to test but upgraded the library to v0.0.6 which has the GPIO 1 fix.</p>
<p dir="auto">With a 94 part when you do the M5.shutdown() the 5v and 3.3v output on the header goes down to 0V showing that the device really powered off and any external circuit that uses this will also power off and not drain the battery.</p>
<p dir="auto">However, on a 4C part with the same exact code, the 5V and 3.3v output remain active. So any electronics that use these will still be powered and will drain the battery...</p>
<p dir="auto">Sent this to support and I hope they will have a fix...</p>
]]></description><link>https://community.m5stack.com/post/18053</link><guid isPermaLink="true">https://community.m5stack.com/post/18053</guid><dc:creator><![CDATA[IndianaTux]]></dc:creator><pubDate>Mon, 25 Jul 2022 16:21:57 GMT</pubDate></item><item><title><![CDATA[Reply to CoreInk wakeup from USB power on Mon, 04 Jul 2022 14:46:33 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/indianatux" aria-label="Profile: IndianaTux">@<bdi>IndianaTux</bdi></a></p>
<p dir="auto">that is interesting. I am curious about whether this actually works.</p>
<p dir="auto">BTW: looks like the proposed fix has been included in the latest <a href="https://github.com/m5stack/M5-CoreInk/commit/9973ea57d79146f1f6b7bba30b1250994ee79c7b" target="_blank" rel="noopener noreferrer nofollow ugc">M5CoreInk library</a>.</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/17903</link><guid isPermaLink="true">https://community.m5stack.com/post/17903</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Mon, 04 Jul 2022 14:46:33 GMT</pubDate></item><item><title><![CDATA[Reply to CoreInk wakeup from USB power on Mon, 04 Jul 2022 13:06:13 GMT]]></title><description><![CDATA[<p dir="auto">Ok sorry for not posting this sooner. This is the answer from support:</p>
<blockquote>
<p dir="auto">We have replaced the USB-Serial chip, from CP2104 to CH9102. These two are pin-to-pin compatible, seems no issue feedback before. You can add before code before shut down the device. It should work.</p>
</blockquote>
<blockquote>
<p dir="auto">pinMode(1, OUTPUT)<br />
digitalWrite(1, 0)</p>
</blockquote>
<blockquote>
<p dir="auto">// then pull down gpio12 to power off</p>
</blockquote>
<p dir="auto">I have not tried it yet but wanted to post it here before I myself loose the e-mail...</p>
]]></description><link>https://community.m5stack.com/post/17902</link><guid isPermaLink="true">https://community.m5stack.com/post/17902</guid><dc:creator><![CDATA[IndianaTux]]></dc:creator><pubDate>Mon, 04 Jul 2022 13:06:13 GMT</pubDate></item><item><title><![CDATA[Reply to CoreInk wakeup from USB power on Fri, 03 Jun 2022 18:22:06 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> Yeah they are supposed to come back to me on Monday.</p>
]]></description><link>https://community.m5stack.com/post/17638</link><guid isPermaLink="true">https://community.m5stack.com/post/17638</guid><dc:creator><![CDATA[IndianaTux]]></dc:creator><pubDate>Fri, 03 Jun 2022 18:22:06 GMT</pubDate></item><item><title><![CDATA[Reply to CoreInk wakeup from USB power on Fri, 03 Jun 2022 08:25:59 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/indianatux" aria-label="Profile: IndianaTux">@<bdi>IndianaTux</bdi></a></p>
<p dir="auto">thank you for reporting back. I guess that means it is not USB, not the HOLD_PIN, not the RTC and most likely not the power button which keeps your M5CoreInks alive.</p>
<p dir="auto">At this point I must assume some missing component, like a missing pullup resistor R32 or a missing pulldown resistor R33, or some short circuit keeping the devices alive.</p>
<p dir="auto">I am curious to hear what M5Stack support eventually comes back with.</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/17635</link><guid isPermaLink="true">https://community.m5stack.com/post/17635</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Fri, 03 Jun 2022 08:25:59 GMT</pubDate></item><item><title><![CDATA[Reply to CoreInk wakeup from USB power on Fri, 03 Jun 2022 02:12:51 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> So I modified my above script to show the GPIO19 state on the screen:</p>
<pre><code>void displayString(char *data) {
    M5.M5Ink.clear();
    delay(1000);
    if( InkPageSprite.creatSprite(0,0,200,200,true) != 0 ){
      Serial.printf("Ink Sprite creat faild");
    }

    InkPageSprite.drawString(35,50,data);
    if(digitalRead(GPIO_NUM_19)) {
      InkPageSprite.drawString(35,70,"GPIO_19 = HIGH");
    } else {
      InkPageSprite.drawString(35,70,"GPIO_19 = LOW");
    }

    InkPageSprite.pushSprite();
}
</code></pre>
<p dir="auto">And it always show HIGH...</p>
]]></description><link>https://community.m5stack.com/post/17633</link><guid isPermaLink="true">https://community.m5stack.com/post/17633</guid><dc:creator><![CDATA[IndianaTux]]></dc:creator><pubDate>Fri, 03 Jun 2022 02:12:51 GMT</pubDate></item><item><title><![CDATA[Reply to CoreInk wakeup from USB power on Thu, 02 Jun 2022 03:00:29 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/indianatux" aria-label="Profile: IndianaTux">@<bdi>IndianaTux</bdi></a></p>
<p dir="auto">ok, so if setting POWER_HOLD_PIN to LOW doesn't shutdown the device then something else is probably keeping it alive. According to the schematic USB, the power button, the hold pin and the RTC can wake up / keep alive the device.</p>
<ul>
<li>Maybe the power button is stuck? (but on 20 devices?)</li>
<li>Maybe some component got soldered on incorrectly?</li>
<li>Maybe the RTC is in alarm state, creating an interrupt and holding INT LOW?</li>
</ul>
<p dir="auto">The last one you could test. According to the schematic the INT output of the RTC is also connected to GPIO19. So if GPIO19 reads LOW it would mean that INT is LOW and that would prevent the M5CoreInk from shutting down.</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/17630</link><guid isPermaLink="true">https://community.m5stack.com/post/17630</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Thu, 02 Jun 2022 03:00:29 GMT</pubDate></item><item><title><![CDATA[Reply to CoreInk wakeup from USB power on Wed, 01 Jun 2022 20:24:23 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> SO I modified a bit my test script so it's easier to read and replaced <code>M5.shutdown()</code> by <code>digitalWrite(POWER_HOLD_PIN, LOW);</code>:</p>
<pre><code>#include &lt;M5CoreInk.h&gt;

Ink_Sprite InkPageSprite(&amp;M5.M5Ink);

void displayString(char *);

// Initial setup
void setup()
{
  Serial.begin(115200);

  // Initialize the M5Stack object
  M5.begin();
  if( !M5.M5Ink.isInit())
  {
    Serial.println("Init failed");
    while (1);
  }

  // Clear screen and display hello world
  displayString("Hello World !");
}

void loop() {

  M5.update();

  if(M5.BtnUP.wasPressed() || !digitalRead(GPIO_NUM_37)) {

    Serial.println("Up pressed");

    // Clear the screen and display "Sleep"
    displayString("Sleep");

    // Shutdown
    // M5.shutdown();
    digitalWrite(POWER_HOLD_PIN, LOW);

    // Clear the screen and display "Alive"
    displayString("Alive");
  }

  Serial.flush();
}

void displayString(char *data) {
    M5.M5Ink.clear();
    delay(1000);
    if( InkPageSprite.creatSprite(0,0,200,200,true) != 0 ){
      Serial.printf("Ink Sprite creat faild");
    }
    InkPageSprite.drawString(35,50,data);
    InkPageSprite.pushSprite();
}
</code></pre>
<p dir="auto">With <code>digitalWrite(POWER_HOLD_PIN, LOW);</code> the device does not even shutdown... It just goes on and displays "Alive" on the devices with MAC address <code>4C</code>.</p>
<p dir="auto">FYI last night I  tested 24 CoreInk modules. 4 have the MAC address starting with <code>94</code> and work great, and the other 20 which all have MAC address starting with <code>4C</code> all fail.</p>
<p dir="auto">I did e-mail support but no response yet.</p>
]]></description><link>https://community.m5stack.com/post/17628</link><guid isPermaLink="true">https://community.m5stack.com/post/17628</guid><dc:creator><![CDATA[IndianaTux]]></dc:creator><pubDate>Wed, 01 Jun 2022 20:24:23 GMT</pubDate></item><item><title><![CDATA[Reply to CoreInk wakeup from USB power on Wed, 01 Jun 2022 14:43:54 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> Did not think of trying that. Will try to do that tonight.</p>
<p dir="auto">As I needed to ship I replaces the <code>M5.shutdown()</code> with the following:</p>
<pre><code>void shutdown(void) {
  while(1) {
    esp_sleep_enable_timer_wakeup(100*1000000);
    gpio_wakeup_enable(GPIO_NUM_37, GPIO_INTR_LOW_LEVEL);
    gpio_wakeup_enable(GPIO_NUM_38, GPIO_INTR_LOW_LEVEL);
    gpio_wakeup_enable(GPIO_NUM_39, GPIO_INTR_LOW_LEVEL);
    esp_sleep_enable_gpio_wakeup();
    esp_light_sleep_start();
    if( esp_sleep_get_wakeup_cause() != ESP_SLEEP_WAKEUP_TIMER) {
      ESP.restart();
    }
  }
}
</code></pre>
<p dir="auto">In my use case I display a message telling the user to toggle the black switch to power it back up. If it runs out of battery while in that loop, plunging in the USB-C power will make it reboot.</p>
<p dir="auto">I'll let you know tonight about your suggestion.</p>
<p dir="auto">What s really strange is that it's 100% constant. MAC address <code>4C*</code> all exhibit the issue while all <code>94*</code> ones work great.</p>
]]></description><link>https://community.m5stack.com/post/17626</link><guid isPermaLink="true">https://community.m5stack.com/post/17626</guid><dc:creator><![CDATA[IndianaTux]]></dc:creator><pubDate>Wed, 01 Jun 2022 14:43:54 GMT</pubDate></item><item><title><![CDATA[Reply to CoreInk wakeup from USB power on Wed, 01 Jun 2022 12:13:51 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/indianatux" aria-label="Profile: IndianaTux">@<bdi>IndianaTux</bdi></a></p>
<p dir="auto">this is an odd one. The fact that pressing the reset button in the back restarts the M5CoreInk in question tells me that it has never actually shut down in the first place.</p>
<p dir="auto">The <code>shutdown()</code> function does some display cleanup and then sets GPIO12 to low. I wonder if the cleanup somehow gets stuck and therefore the statement to set GPIO12 to low never is executed?</p>
<p dir="auto">What happens if you replace <code>M5.shutdown()</code> in your example with <code>digitalWrite(POWER_HOLD_PIN, LOW);</code>? Does that help?</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/17625</link><guid isPermaLink="true">https://community.m5stack.com/post/17625</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Wed, 01 Jun 2022 12:13:51 GMT</pubDate></item><item><title><![CDATA[Reply to CoreInk wakeup from USB power on Wed, 01 Jun 2022 02:23:12 GMT]]></title><description><![CDATA[<p dir="auto">So I made this really dumb firmware that just goes to shutdown when the switch is toggled up.</p>
<pre><code class="language-#include">
Ink_Sprite InkPageSprite(&amp;M5.M5Ink);

// Initial setup
void setup()
{
  Serial.begin(115200);

  // Initialize the M5Stack object
  M5.begin();
  if( !M5.M5Ink.isInit())
  {
    Serial.println("Init failed");
    while (1);
  }

  // Clear screen and display hello world
  M5.M5Ink.clear();
  delay(1000);
  if( InkPageSprite.creatSprite(0,0,200,200,true) != 0 ){
    Serial.printf("Ink Sprite creat faild");
  }
  InkPageSprite.drawString(35,50,"Hello World!");
  InkPageSprite.pushSprite();
}

void loop() {

  M5.update();

  if(M5.BtnUP.wasPressed() || !digitalRead(GPIO_NUM_37)) {

    // Clear the screen and display "Sleep"
    M5.M5Ink.clear();
    delay(1000);
    if( InkPageSprite.creatSprite(0,0,200,200,true) != 0 ){
      Serial.printf("Ink Sprite creat faild");
    }
    InkPageSprite.drawString(35,50,"Sleep");
    InkPageSprite.pushSprite();

    // Shutdown
    M5.shutdown();
  }

}
</code></pre>
<p dir="auto">Effects on a "working" module and a "non-working" don't can be seen here in this video: <a href="https://youtu.be/PA7EKmGJql4" target="_blank" rel="noopener noreferrer nofollow ugc">https://youtu.be/PA7EKmGJql4</a></p>
]]></description><link>https://community.m5stack.com/post/17620</link><guid isPermaLink="true">https://community.m5stack.com/post/17620</guid><dc:creator><![CDATA[IndianaTux]]></dc:creator><pubDate>Wed, 01 Jun 2022 02:23:12 GMT</pubDate></item></channel></rss>