<?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 How to get the 52259 RTC running? in ColdFire/68K Microcontrollers and Processors</title>
    <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-get-the-52259-RTC-running/m-p/200508#M9159</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm currently trying to transfer some RTC code from the 52235 CPU to the 52259 CPU.&lt;/P&gt;&lt;P&gt;Getting the RTC in the 52235 running is easy as can be - just write MCF_CLOCK_RTCDR with the appropriate value and the RTC starts running.&lt;/P&gt;&lt;P&gt;Doing the same in the 52259 doesn't appear to be enough though - probably because the RTC in the 52259 can have several sources as reference.&lt;/P&gt;&lt;P&gt;I just want the RTC in my 52259 to run from the main 48MHz crystal reference, but I can't figure out how and don't have the data sheets available (and they can't be found on the freescale web site either right now!).&lt;/P&gt;&lt;P&gt;So please, can anyone help me out?&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 18 Jul 2009 17:34:29 GMT</pubDate>
    <dc:creator>vier_kuifjes</dc:creator>
    <dc:date>2009-07-18T17:34:29Z</dc:date>
    <item>
      <title>How to get the 52259 RTC running?</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-get-the-52259-RTC-running/m-p/200508#M9159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm currently trying to transfer some RTC code from the 52235 CPU to the 52259 CPU.&lt;/P&gt;&lt;P&gt;Getting the RTC in the 52235 running is easy as can be - just write MCF_CLOCK_RTCDR with the appropriate value and the RTC starts running.&lt;/P&gt;&lt;P&gt;Doing the same in the 52259 doesn't appear to be enough though - probably because the RTC in the 52259 can have several sources as reference.&lt;/P&gt;&lt;P&gt;I just want the RTC in my 52259 to run from the main 48MHz crystal reference, but I can't figure out how and don't have the data sheets available (and they can't be found on the freescale web site either right now!).&lt;/P&gt;&lt;P&gt;So please, can anyone help me out?&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 18 Jul 2009 17:34:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-get-the-52259-RTC-running/m-p/200508#M9159</guid>
      <dc:creator>vier_kuifjes</dc:creator>
      <dc:date>2009-07-18T17:34:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the 52259 RTC running?</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-get-the-52259-RTC-running/m-p/200509#M9160</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marc&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the initialisation code that I have for running from the oscillator directly:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; RTCCTL = RTC_ENABLE;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; MCF_CLOCK_RTCCR = 0;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // select system clock for RTC&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; RTCGOCU = (unsigned short)((CRYSTAL_FREQ) &amp;gt;&amp;gt; 16);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; RTCGOCL = (unsigned short)(CRYSTAL_FREQ);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;where&lt;/P&gt;&lt;P&gt;&amp;nbsp; #define RTC_ENABLE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x00000080&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // enable the RTC&lt;/P&gt;&lt;P&gt;and&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #define CRYSTAL_FREQ&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 48000000&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // 48 MHz oscillator / crystal input&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It seems as though there are presently some problems with various documents on the web site so I have sent you the data sheet and user's manual to your private email address.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 18 Jul 2009 18:00:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-get-the-52259-RTC-running/m-p/200509#M9160</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2009-07-18T18:00:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the 52259 RTC running?</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-get-the-52259-RTC-running/m-p/200510#M9161</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your help Mark!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately it is still not running... I'm not sure what's going on or what I am doing wrong. This is my current startup code... (Coldfire Lite based)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;
void
mcf52259_init(void)
{

 MCF_GPIO_PDDPAR = 0x0F;  //enable pst[0..3]
 
 /*
  * Set Port UA to initialize URXD0/UTXD0
  */
    MCF_GPIO_PUAPAR = 0
        | MCF_GPIO_PUAPAR_URXD0_URXD0
        | MCF_GPIO_PUAPAR_UTXD0_UTXD0;

    MCF_GPIO_PUBPAR = 0
        | MCF_GPIO_PUBPAR_URXD1_URXD1
        | MCF_GPIO_PUBPAR_UTXD1_UTXD1;


 mcf52259_wtm_init();
 mcf52259_pll_init();

 /* Set real time clock freq */

 MCF_CLOCK_RTCCR = 0; // select RTC clock source
 MCF_RTC_RTCGOCU = (unsigned short)((48000000 / 6) &amp;gt;&amp;gt; 16);
 MCF_RTC_RTCGOCL = (unsigned short)(48000000 / 6);
 MCF_RTC_RTCCTL  = MCF_RTC_RTCCTL_EN; // enable RTC

 mcf52259_scm_init();
 mcf52259_ccm_init();
 mcf52259_gpio_init();
#ifdef M52259EVB
 mcf52259_mb_init();
#endif
    uart_init(0);
    uart_init(1);

 mcf52259_powerup_config();
 mcf52259_ePHY_init();
// mcf52259_wtm_config();  //FSL added this function...reference M52233DEMO code
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I tried changing the order of the instructions but it didn't make any difference.&lt;/P&gt;&lt;P&gt;I can write the time in the RTC and read it back correctly, but it is never updated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I only read the hours/minutes register of the RTC by the way, and set the seconds register to 0 when the hours/minutes are written into the register.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 19 Jul 2009 20:21:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-get-the-52259-RTC-running/m-p/200510#M9161</guid>
      <dc:creator>vier_kuifjes</dc:creator>
      <dc:date>2009-07-19T20:21:24Z</dc:date>
    </item>
    <item>
      <title>Re: Request 52259 Datasheet</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-get-the-52259-RTC-running/m-p/200511#M9162</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mark,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(I couldn't figure out how to send you a private message.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If possible, would you please send me the 52259 Datasheet? My latest copy of the MCF52259RM ref manual is Rev.1 2/2009 so send that too if you have a newer version. Hopefully, clicking on my profile name will allow you to send me an email.&amp;nbsp; Thank-you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jul 2009 08:43:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-get-the-52259-RTC-running/m-p/200511#M9162</guid>
      <dc:creator>tupdegrove</dc:creator>
      <dc:date>2009-07-20T08:43:24Z</dc:date>
    </item>
    <item>
      <title>Re: Request 52259 Datasheet</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-get-the-52259-RTC-running/m-p/200512#M9163</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Tim,&lt;/P&gt;&lt;P&gt;I just sent you a private message.&lt;/P&gt;&lt;P&gt;Regards - Marc&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jul 2009 14:51:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-get-the-52259-RTC-running/m-p/200512#M9163</guid>
      <dc:creator>vier_kuifjes</dc:creator>
      <dc:date>2009-07-20T14:51:41Z</dc:date>
    </item>
  </channel>
</rss>

