<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: RTC Configuration in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/RTC-Configuration/m-p/159591#M1130</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi. i'm currently using the M52259DEMO board, as far as i know it doesn't need some jumpers for the RTC, correct me if i'm wrong.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 06 Dec 2009 12:16:09 GMT</pubDate>
    <dc:creator>Jairo</dc:creator>
    <dc:date>2009-12-06T12:16:09Z</dc:date>
    <item>
      <title>RTC Configuration</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/RTC-Configuration/m-p/159589#M1128</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, i was working with an application using the RTC module, but i'm getting troubles with it. I based my code on the rtc example but apparently the System Clock is not working, i make consults to the time struct with an event, and then print it to terminal, but always display 00d 00hrs 00m 00s, the initialization code is posted below. I begin to have this problem when i implemented the ADC and another task that is checking for several alarms setted (this task has a _time_delay of 60s).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;
//__________________RTC_______________
    _rtc_init(RTC_INIT_FLAG_CLEAR | RTC_INIT_FLAG_ENABLE);
 _rtc_get_time (&amp;amp;time_rtc);
 _rtc_time_from_mqx_time (&amp;amp;time_mqx, &amp;amp;time_rtc);
 _rtc_time_to_mqx_time (&amp;amp;time_rtc, &amp;amp;time_mqx);
    printf ("MQX: %d s, %d ms\n", time_mqx.SECONDS, time_mqx.MILLISECONDS);
 printf ("    (%d d, %d hr, %d m, %d s)\n", time_rtc.days, time_rtc.hours, time_rtc.minutes, time_rtc.seconds);&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;In the function for set the clock to the actual time:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;
printf("Tiempo guardado: %d:%d:00", hora,min);
 time_rtc.hours=hora;
 time_rtc.minutes=min;
 time_rtc.seconds=0;
 _rtc_set_time(&amp;amp;time_rtc);
 _rtc_get_time (&amp;amp;time_rtc);  
 printf ("MQX: %d s, %d ms\n", time_mqx.SECONDS, time_mqx.MILLISECONDS);
    printf ("    (%d d, %d hr, %d m, %d s)\n", time_rtc.days, time_rtc.hours, time_rtc.minutes,time_rtc.seconds);
 sendCMD(CLR_SCR);
 sendCMD(HOME);
    sendString(str2);&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;The struct has the configured parameters but it doesn't change.&lt;/P&gt;&lt;P&gt;This last code fragment is in the event part, it is suppossed that this will show the time. Worked for me before including the ADC task.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;
    _rtc_get_time (&amp;amp;time_rtc);  
 printf ("MQX: %d s, %d ms\n", time_mqx.SECONDS, time_mqx.MILLISECONDS);
     printf ("    (%d d, %d hr, %d m, %d s)\n", time_rtc.days, time_rtc.hours, time_rtc.minutes, time_rtc.seconds);
&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&amp;nbsp;The MQX time never changes its value, always is zero for seconds and milliseconds.&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;it's necesary som kind of trigger or refresh function for the time struct?&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&amp;nbsp;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:05:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/RTC-Configuration/m-p/159589#M1128</guid>
      <dc:creator>Jairo</dc:creator>
      <dc:date>2020-10-29T09:05:00Z</dc:date>
    </item>
    <item>
      <title>Re: RTC Configuration</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/RTC-Configuration/m-p/159590#M1129</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What hardware are you using?, any of the evaluation boards?&lt;/P&gt;&lt;P&gt;Do you have the Jumpers correctly selected to power up the RTC module?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by Jaime R on&lt;/SPAN&gt; &lt;SPAN class="local-date"&gt;2009-12-04&lt;/SPAN&gt; &lt;SPAN class="local-time"&gt;11:07 PM&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 05 Dec 2009 07:06:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/RTC-Configuration/m-p/159590#M1129</guid>
      <dc:creator>JaimeR</dc:creator>
      <dc:date>2009-12-05T07:06:46Z</dc:date>
    </item>
    <item>
      <title>Re: RTC Configuration</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/RTC-Configuration/m-p/159591#M1130</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi. i'm currently using the M52259DEMO board, as far as i know it doesn't need some jumpers for the RTC, correct me if i'm wrong.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 06 Dec 2009 12:16:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/RTC-Configuration/m-p/159591#M1130</guid>
      <dc:creator>Jairo</dc:creator>
      <dc:date>2009-12-06T12:16:09Z</dc:date>
    </item>
    <item>
      <title>Re: RTC Configuration</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/RTC-Configuration/m-p/159592#M1131</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it seems to me that in your event&amp;nbsp;RTC code you don't translate RTC time to MQX time.&lt;/P&gt;&lt;P&gt;That's why it's always zero.&lt;/P&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;_rtc_get_time (&amp;amp;time_rtc);&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#ff0000"&gt;_rtc_time_to_mqx_time (&amp;amp;time_rtc, &amp;amp;time_mqx);&lt;BR /&gt;&lt;/FONT&gt;printf ("MQX: %d s, %d ms\n", time_mqx.SECONDS, time_mqx.MILLISECONDS);&lt;BR /&gt;printf ("&amp;nbsp;&amp;nbsp;&amp;nbsp; (%d d, %d hr, %d m, %d s)\n", time_rtc.days, time_rtc.hours, time_rtc.minutes, time_rtc.seconds);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or if you want to see current MQX time, use this function instead:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#ff0000"&gt;_time_get (&amp;amp;time_mqx);&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;PetrM&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by PetrM on&lt;/SPAN&gt; &lt;SPAN class="local-date"&gt;2009-12-07&lt;/SPAN&gt; &lt;SPAN class="local-time"&gt;03:34 PM&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Dec 2009 23:31:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/RTC-Configuration/m-p/159592#M1131</guid>
      <dc:creator>PetrM</dc:creator>
      <dc:date>2009-12-07T23:31:10Z</dc:date>
    </item>
  </channel>
</rss>

