<?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[Core2: AXP2101 giving false values]]></title><description><![CDATA[<p dir="auto">Hi there,</p>
<p dir="auto">I have a problem getting my arduino program to work on my new Core2 with an AXP2101 power management chip. The exact same code works properly on an older Core2 with an AXP192.</p>
<p dir="auto">When I request M5.axp.isCharging(), this value always stays 1, also when it is not plugged in. Also GetBatPower() and GetBatChargeCurrent() give incorrect values.  It seems that the arduino Core2 library is not up-to-date..<br />
Can anyone help me and tell me how to get the correct data?</p>
<p dir="auto">Thanks a lot! Tjeerd</p>
]]></description><link>https://community.m5stack.com/topic/5968/core2-axp2101-giving-false-values</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Apr 2026 17:15:43 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/5968.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 11 Jan 2024 14:10:33 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Core2: AXP2101 giving false values on Mon, 13 May 2024 09:22:40 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/robouden" aria-label="Profile: robouden">@<bdi>robouden</bdi></a> To get the Core2 V1.1 units to power on from an external supply, I found a fix was needed in the axp::begin() function to check for VBUS power before deciding whether to enable the VBUS converter.  Both my fix and the current official version can be found here <a href="https://github.com/m5stack/M5Core2/commit/c26f1b63635c90d9bd82d87db6ab4d9048b3a1b5" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/m5stack/M5Core2/commit/c26f1b63635c90d9bd82d87db6ab4d9048b3a1b5</a></p>
]]></description><link>https://community.m5stack.com/post/25201</link><guid isPermaLink="true">https://community.m5stack.com/post/25201</guid><dc:creator><![CDATA[colintd]]></dc:creator><pubDate>Mon, 13 May 2024 09:22:40 GMT</pubDate></item><item><title><![CDATA[Reply to Core2: AXP2101 giving false values on Fri, 23 Feb 2024 10:03:22 GMT]]></title><description><![CDATA[<p dir="auto">On the M5StackCore 2 V1.0 by connecting the battery, it did automatically switch on. But on the M5SatckCore 2 V1.1  it does not. How to program the M5Satck Core 2 V1.1 to automatically power up from connecting to a battery?</p>
<p dir="auto">Regards,<br />
Rob Oudendijk</p>
]]></description><link>https://community.m5stack.com/post/24056</link><guid isPermaLink="true">https://community.m5stack.com/post/24056</guid><dc:creator><![CDATA[robouden]]></dc:creator><pubDate>Fri, 23 Feb 2024 10:03:22 GMT</pubDate></item><item><title><![CDATA[Reply to Core2: AXP2101 giving false values on Mon, 15 Jan 2024 12:42:14 GMT]]></title><description><![CDATA[<p dir="auto">Hi <a class="plugin-mentions-user plugin-mentions-a" href="/user/felmue" aria-label="Profile: felmue">@<bdi>felmue</bdi></a> , thank you very much for your help. With that I was able to add some lines to the axp2101.h and axp2101.cpp of the Core2 library. I can now successfully check .isCharging() of the axp2101. I am will try to do the same thing for other functions..</p>
<p dir="auto">Thanks again!</p>
<p dir="auto">added to axp2101.h:</p>
<pre><code>bool isCharging(void);
</code></pre>
<p dir="auto">added to axp2101.cpp:</p>
<pre><code>bool AXP2101::isCharging()  {
    uint8_t registerValue = readRegister8(_addr, 0x01, _speed);      
    return (registerValue &amp; 0b01100000) == 0b00100000;
} 
</code></pre>
<p dir="auto">Changed in axp.cpp:</p>
<pre><code>bool AXP::isCharging() {
    if (_pmic == pmic_axp192) {
        return axp192.isCharging();
    }
    if (_pmic == pmic_axp2101) {
        return axp2101.isCharging();
    }
    return true;
}
</code></pre>
]]></description><link>https://community.m5stack.com/post/23351</link><guid isPermaLink="true">https://community.m5stack.com/post/23351</guid><dc:creator><![CDATA[TuigWerk]]></dc:creator><pubDate>Mon, 15 Jan 2024 12:42:14 GMT</pubDate></item><item><title><![CDATA[Reply to Core2: AXP2101 giving false values on Thu, 11 Jan 2024 14:31:28 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/tuigwerk" aria-label="Profile: TuigWerk">@<bdi>TuigWerk</bdi></a></p>
<p dir="auto">these functions are not (yet) implemented for the AXP2101. For instance <code>isCharging()</code> always returns <code>true</code>.  See <a href="https://github.com/m5stack/M5Core2/blob/master/src/AXP.cpp#L415" target="_blank" rel="noopener noreferrer nofollow ugc">here</a>.</p>
<p dir="auto">Maybe have a look at M5Unified library. <code>isCharging()</code> seems to be implemented <a href="https://github.com/m5stack/M5Unified/blob/master/src/utility/AXP2101_Class.cpp#L167" target="_blank" rel="noopener noreferrer nofollow ugc">here</a>.</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/23306</link><guid isPermaLink="true">https://community.m5stack.com/post/23306</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Thu, 11 Jan 2024 14:31:28 GMT</pubDate></item></channel></rss>