<?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>MQX Software SolutionsのトピックRe: RTC in MQX 3..6</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/RTC-in-MQX-3-6/m-p/215921#M5527</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe the BSPCFG_ENABLE_RTCDEV is not enabled.&lt;/P&gt;&lt;P&gt;In BSP file init_bsp.c, there's RTC being enabled&amp;nbsp;including those registers you mentioned (_bsp_rtc_io_init() function).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note to your code: you should first install and then enable the RTC interrupt.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PetrM&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 02 Aug 2010 21:47:21 GMT</pubDate>
    <dc:creator>PetrM</dc:creator>
    <dc:date>2010-08-02T21:47:21Z</dc:date>
    <item>
      <title>RTC in MQX 3..6</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/RTC-in-MQX-3-6/m-p/215920#M5526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everybody. I made a project with no MQX support and now I need to migrate to MQX, starting from RTC. I'm using the M52259demo board.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I built this project in MQX 3.5 and it was working fine. While debugging I could see the registers&amp;nbsp;RTCGOCL = 0x2000 and RTCCR = 0x67 that were the values I used before introducing MQX in my project.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I updated from CW 7.1.2 to CW 7.2 and installed MQX 3.6 and this same project is not running anymore. Infact the register&amp;nbsp;RTCGOCL is stuck to 0x0000 and&amp;nbsp;RTCCR to 0x06 that are their reset values. I don't know how to access this registers and why they were set correctly in the previous MQX version (at least I noticed that).&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to write the register RTCGOCL through the function "__rtc_register_write" and getting the base address of the RTC registers. But I cannot access the RTCCR register so I should anyway find a correct value for RTCGOCH and RTCGOCL using the internal 80Mhz system frequency as clock, but I don't want to do that.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my code. I get the time values through scanf function: first the days value then the time values as "hh.mm.ss" format.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;#include &amp;lt;mqx.h&amp;gt;#include &amp;lt;bsp.h&amp;gt;#include "main.h"#include &amp;lt;rtc.h&amp;gt;#include &amp;lt;mcf52xx_rtc.h&amp;gt;#if !BSPCFG_ENABLE_IO_SUBSYSTEM#error This application requires BSPCFG_ENABLE_IO_SUBSYSTEM defined non-zero in user_config.h. Please recompile BSP with this option.#endif#ifndef BSP_DEFAULT_IO_CHANNEL_DEFINED#error This application requires BSP_DEFAULT_IO_CHANNEL to be not NULL. Please set corresponding BSPCFG_ENABLE_TTYx to non-zero in user_config.h and recompile BSP with this option.#endifvoid      my_rtc_isr(void);TASK_TEMPLATE_STRUCT MQX_template_list[] = { /*  Task number, Entry point, Stack, Pri, String, Auto? */   {MAIN_TASK,   Main_task,   1500,  9,   "main", MQX_AUTO_START_TASK},   {0,           0,           0,     0,   0,      0,                 }};RTC_TIME_STRUCT   rtc_time;void Main_task(uint_32 initial_data){ uint_32     state;    uint_32     days, hours, minutes, seconds;           printf ("Benvenuti! \r\n");  printf ("Inserire giorno:\r\n"); scanf ("%d", &amp;amp;days); printf ("Inserire ora come hh.mm.ss:\r\n"); scanf ("%d.%d.%d", &amp;amp;hours, &amp;amp;minutes, &amp;amp;seconds);  rtc_time.seconds = seconds; rtc_time.minutes = minutes; rtc_time.hours = hours; rtc_time.days = days;  _rtc_set_time (&amp;amp;rtc_time);  printf ("Inizializzazione RTC...\r\n");     if (MQX_OK != _rtc_init (RTC_INIT_FLAG_RESET | RTC_INIT_FLAG_ENABLE)) { printf ("Errore di inizializzazione\r\n"); }  state = _rtc_int_enable (TRUE, MCF52XX_RTC_RTCIENR_1HZ); printf ("Nuovo stato interrupt: %d\r\n", state);    printf ("Installazione ISR RTC...\r\n"); if (MQX_OK != _rtc_int_install (my_rtc_isr)) { printf ("Errore di installazione ISR\r\n"); }  for(;;) {   }       _mqx_exit(0);}void my_rtc_isr(){ _rtc_get_time (&amp;amp;rtc_time); printf ("Sono le %d.%d.%d del giorno %d\r\n", rtc_time.hours, rtc_time.minutes, rtc_time.seconds, rtc_time.days); _rtc_clear_requests (MCF52XX_RTC_RTCISR_1HZ); }/* EOF */&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Marco.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 01 Aug 2010 17:40:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/RTC-in-MQX-3-6/m-p/215920#M5526</guid>
      <dc:creator>LordMark</dc:creator>
      <dc:date>2010-08-01T17:40:36Z</dc:date>
    </item>
    <item>
      <title>Re: RTC in MQX 3..6</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/RTC-in-MQX-3-6/m-p/215921#M5527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe the BSPCFG_ENABLE_RTCDEV is not enabled.&lt;/P&gt;&lt;P&gt;In BSP file init_bsp.c, there's RTC being enabled&amp;nbsp;including those registers you mentioned (_bsp_rtc_io_init() function).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note to your code: you should first install and then enable the RTC interrupt.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PetrM&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Aug 2010 21:47:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/RTC-in-MQX-3-6/m-p/215921#M5527</guid>
      <dc:creator>PetrM</dc:creator>
      <dc:date>2010-08-02T21:47:21Z</dc:date>
    </item>
    <item>
      <title>Re: RTC in MQX 3..6</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/RTC-in-MQX-3-6/m-p/215922#M5528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your suggestion &lt;IMG alt=":smileywink:" class="emoticon emoticon-smileywink" id="smileywink" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-wink.gif" title="Smiley Wink" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Aug 2010 01:14:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/RTC-in-MQX-3-6/m-p/215922#M5528</guid>
      <dc:creator>LordMark</dc:creator>
      <dc:date>2010-08-04T01:14:10Z</dc:date>
    </item>
    <item>
      <title>Re: RTC in MQX 3..6</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/RTC-in-MQX-3-6/m-p/215923#M5529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I'm working with the HCS12 and HCS12X series. I want to know, if possible to do one application with the MQX ussing this microcontrollers?. many thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Dec 2010 05:36:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/RTC-in-MQX-3-6/m-p/215923#M5529</guid>
      <dc:creator>wilero17</dc:creator>
      <dc:date>2010-12-04T05:36:22Z</dc:date>
    </item>
    <item>
      <title>Re: RTC in MQX 3..6</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/RTC-in-MQX-3-6/m-p/215924#M5530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV class="lia"&gt;&lt;P&gt;This family of devices is not on the roadmap for FSLMQX support.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Dec 2010 22:59:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/RTC-in-MQX-3-6/m-p/215924#M5530</guid>
      <dc:creator>DavidS</dc:creator>
      <dc:date>2010-12-08T22:59:24Z</dc:date>
    </item>
  </channel>
</rss>

