<?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[RTC acting weird]]></title><description><![CDATA[<p dir="auto">Hi all,</p>
<p dir="auto">There is something really weird with my RTC.<br />
I try to get the NTP time over WiFi, and then set the RTC with that time. Connecting the WiFi and getting the NTP time works flawless, the time shows correct, but then something goes wrong, and I can't figure out what. I tried it with the standard M5.Rtc structs, and now with the BM8563 library, but the result is the same: the time looks something like 13:00:00, and the hours (the 13 in this case) tick like seconds. The minutes and the seconds stay 00. The hours tick every second +1, sometimes until 19, sometimes until 35, ... and then restart from 00.</p>
<p dir="auto">This is my code:</p>
<p dir="auto">#include &lt;I2C_BM8563.h&gt;</p>
<p dir="auto">#include &lt;M5Core2.h&gt;<br />
#include &lt;WiFi.h&gt;<br />
#include &lt;NTPClient.h&gt;</p>
<p dir="auto">WiFiUDP ntpUDP;<br />
NTPClient timeClient(ntpUDP);</p>
<p dir="auto">#define BM8563_I2C_SDA 21<br />
#define BM8563_I2C_SCL 22</p>
<p dir="auto">I2C_BM8563 rtc(I2C_BM8563_DEFAULT_ADDRESS, Wire1);</p>
<p dir="auto">const char *ssid = "mySSID";<br />
const char *password = "myPassword";</p>
<p dir="auto">//RTC_TimeTypeDef RTCtime;</p>
<p dir="auto">int hour;<br />
int minute;<br />
int second;</p>
<p dir="auto">void setup() {<br />
M5.begin();<br />
Serial.begin(115200);</p>
<p dir="auto">WiFi.begin(ssid, password);<br />
Wire1.begin(BM8563_I2C_SDA, BM8563_I2C_SCL);<br />
rtc.begin();</p>
<p dir="auto">M5.Lcd.setTextSize(1);<br />
M5.Lcd.print("Connecting");</p>
<p dir="auto">while ( WiFi.status() != WL_CONNECTED ) {<br />
delay (500);<br />
M5.Lcd.print(".");<br />
}</p>
<p dir="auto">timeClient.begin();<br />
delay (1000);<br />
timeClient.update();</p>
<p dir="auto">hour = timeClient.getHours();<br />
minute = timeClient.getMinutes();<br />
second = timeClient.getSeconds();</p>
<p dir="auto">M5.Lcd.print("Got time ");<br />
M5.Lcd.print(hour);<br />
M5.Lcd.print(":");<br />
M5.Lcd.print(minute);<br />
M5.Lcd.print(":");<br />
M5.Lcd.println(second);</p>
<p dir="auto">I2C_BM8563_TimeTypeDef timeStruct;<br />
timeStruct.hours   = hour;<br />
timeStruct.minutes = minute;<br />
timeStruct.seconds = second;<br />
rtc.setTime(&amp;timeStruct);<br />
}</p>
<p dir="auto">void loop() {<br />
I2C_BM8563_TimeTypeDef timeStruct;</p>
<p dir="auto">M5.Lcd.setTextSize(2);<br />
M5.Lcd.setCursor(40,40);</p>
<p dir="auto">rtc.getTime(&amp;timeStruct);</p>
<p dir="auto">M5.Lcd.printf("Time: %02d:%02d:%02d\n",timeStruct.hours, timeStruct.minutes, timeStruct.seconds);<br />
delay(1000);<br />
}</p>
<p dir="auto">Any help is greatly appreciated ...</p>
]]></description><link>https://community.m5stack.com/topic/3369/rtc-acting-weird</link><generator>RSS for Node</generator><lastBuildDate>Tue, 10 Mar 2026 06:29:17 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/3369.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 13 Jun 2021 20:04:35 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to RTC acting weird on Wed, 30 Jun 2021 08:41:54 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/1">@m5stack</a></p>
<p dir="auto">good to know. Thank you for fixing the issue and letting us know. I appreciate it.</p>
<p dir="auto">(I myself cannot test the fix though as I don't have any M5Stack devices with that specific RTC chip.)</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/14278</link><guid isPermaLink="true">https://community.m5stack.com/post/14278</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Wed, 30 Jun 2021 08:41:54 GMT</pubDate></item><item><title><![CDATA[Reply to RTC acting weird on Wed, 30 Jun 2021 02:03:19 GMT]]></title><description><![CDATA[<p dir="auto">Hi, we already update the lib to fix these issues. so please update your lib to the latest.</p>
<p dir="auto"><a href="https://github.com/m5stack/M5Core2" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/m5stack/M5Core2</a></p>
]]></description><link>https://community.m5stack.com/post/14275</link><guid isPermaLink="true">https://community.m5stack.com/post/14275</guid><dc:creator><![CDATA[m5stack]]></dc:creator><pubDate>Wed, 30 Jun 2021 02:03:19 GMT</pubDate></item><item><title><![CDATA[Reply to RTC acting weird on Mon, 28 Jun 2021 06:45:12 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/566">@yusukef3a</a></p>
<p dir="auto">that is interesting - thank you for sharing.</p>
<p dir="auto">I've just checked my M5Core2s and all three of them have a BM8563 mounted. I guess the HYM8563S in your M5Core2 is either faulty or it isn't fully compatible to begin with.</p>
<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/9634">@tom8787</a> - do you happen to have checked which brand is mounted in your M5Core2?</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/14255</link><guid isPermaLink="true">https://community.m5stack.com/post/14255</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Mon, 28 Jun 2021 06:45:12 GMT</pubDate></item><item><title><![CDATA[Reply to RTC acting weird on Sun, 27 Jun 2021 08:24:42 GMT]]></title><description><![CDATA[<p dir="auto">Hi <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/9634">@tom8787</a><br />
I have same issue.<br />
I checked RTC IC (BM8563),  it was mounted HYM8563S.<br />
i replaced BM8563  IT WORKED!!! (replace from M5StickC RTC ,its "BM8563")</p>
]]></description><link>https://community.m5stack.com/post/14250</link><guid isPermaLink="true">https://community.m5stack.com/post/14250</guid><dc:creator><![CDATA[yusukef3a]]></dc:creator><pubDate>Sun, 27 Jun 2021 08:24:42 GMT</pubDate></item><item><title><![CDATA[Reply to RTC acting weird on Tue, 15 Jun 2021 17:22:46 GMT]]></title><description><![CDATA[<p dir="auto">Small update: I just used M5burner to reinstall the Factory Test, same result, so I'm getting in touch with the supplier, hopefully I can get a new one ...</p>
]]></description><link>https://community.m5stack.com/post/14124</link><guid isPermaLink="true">https://community.m5stack.com/post/14124</guid><dc:creator><![CDATA[tom8787]]></dc:creator><pubDate>Tue, 15 Jun 2021 17:22:46 GMT</pubDate></item><item><title><![CDATA[Reply to RTC acting weird on Mon, 14 Jun 2021 15:33:00 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/4037">@felmue</a> said in <a href="/post/14110">RTC acting weird</a>:</p>
<blockquote>
<p dir="auto">RTC issue</p>
</blockquote>
<p dir="auto">Hi Felix,</p>
<p dir="auto">Thanks a lot! I'll open up mine and see whether indeed there's something wrong with the soldering (or maybe just a flat battery).</p>
<p dir="auto">Kind regards,</p>
<p dir="auto">Tom.</p>
]]></description><link>https://community.m5stack.com/post/14113</link><guid isPermaLink="true">https://community.m5stack.com/post/14113</guid><dc:creator><![CDATA[tom8787]]></dc:creator><pubDate>Mon, 14 Jun 2021 15:33:00 GMT</pubDate></item><item><title><![CDATA[Reply to RTC acting weird on Mon, 14 Jun 2021 09:13:14 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/9634">@tom8787</a></p>
<p dir="auto">I am afraid you are correct and your device might be faulty.</p>
<p dir="auto">I can run your code from the first post just fine on my M5Core2. Also the rtc_wakeup example runs ok for me too.</p>
<p dir="auto">BTW: I had an <a href="https://community.m5stack.com/topic/2501/m5stickc-plus-quality-control-issue">RTC issue</a> on one of my M5StickC Plus a while ago - maybe something similar is plaguing your device?</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/14110</link><guid isPermaLink="true">https://community.m5stack.com/post/14110</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Mon, 14 Jun 2021 09:13:14 GMT</pubDate></item><item><title><![CDATA[Reply to RTC acting weird on Sun, 13 Jun 2021 20:13:25 GMT]]></title><description><![CDATA[<p dir="auto">UPDATE: there must be something wrong with my device, because even the rtc_wakeup example included in the M5Core examples gives me exactly the same. In the example, the time is set manually to 10:30:45, but immediately it shows on my device as 32:00:00 and the hours start counting as if they were seconds.</p>
<p dir="auto">Anyone else experienced this?</p>
]]></description><link>https://community.m5stack.com/post/14103</link><guid isPermaLink="true">https://community.m5stack.com/post/14103</guid><dc:creator><![CDATA[tom8787]]></dc:creator><pubDate>Sun, 13 Jun 2021 20:13:25 GMT</pubDate></item></channel></rss>