<?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>LPCXpresso IDEのトピックRe: RTC problem in LPC1768</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/RTC-problem-in-LPC1768/m-p/596985#M32073</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by serge on Thu Feb 07 00:23:23 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Actualy this is a known 'feature'.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The RTC clock is not very acurate on these MCU's&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Fortunately there is a way to calibrate the RTC so take a look at&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Application note &lt;/SPAN&gt;&lt;A href="http://http://www.nxp.com/documents/other/rtc_calibration_project.zip"&gt;AN10849&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 21:38:24 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T21:38:24Z</dc:date>
    <item>
      <title>RTC problem in LPC1768</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/RTC-problem-in-LPC1768/m-p/596983#M32071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by mtgtech on Wed Feb 06 12:24:34 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hello, I'm having problems with RTC in LPC1768. The RTC is running, but is advancing approx 5 seconds per hour. The electrical circuit is good, with a 20ppm crystal tolerance, and 12,5pf capacitors of load. Tha VBAT is conected in CR1220 lithium battery. I have reviewed the source code and is OK. Below is my code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;
void InitRTC(void) {
&amp;nbsp; LPC_RTC-&amp;gt;CCR&amp;nbsp; =( !CLKEN |&amp;nbsp; CTCRST );
&amp;nbsp; LPC_RTC-&amp;gt;CCR &amp;amp;= ~CTCRST;
&amp;nbsp; return;
}
/***************************/
void StartRTC(void){
&amp;nbsp; LPC_RTC-&amp;gt;CCR |=( CLKEN );
&amp;nbsp; return;
}
/***************************/
int main (void){
&amp;nbsp; char temp[36];
&amp;nbsp; InitRTC();
&amp;nbsp; StartRTC();
&amp;nbsp; while(1){
&amp;nbsp;&amp;nbsp;&amp;nbsp; sprintf ((char *)temp,"%2.2d/%2.2d/%.2d&amp;nbsp;&amp;nbsp; %2.2d:%2.2d",LPC_RTC-&amp;gt;DOM,LPC_RTC-&amp;gt;MONTH,LPC_RTC-&amp;gt;YEAR,LPC_RTC-&amp;gt;HOUR,LPC_RTC-&amp;gt;MIN);
&amp;nbsp;&amp;nbsp;&amp;nbsp; lcd_gotoxy(1,0);
&amp;nbsp;&amp;nbsp;&amp;nbsp; lcd_print(temp);
&amp;nbsp; }
&amp;nbsp; return 0;
}
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anyone know what might be happening?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 21:38:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/RTC-problem-in-LPC1768/m-p/596983#M32071</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T21:38:23Z</dc:date>
    </item>
    <item>
      <title>Re: RTC problem in LPC1768</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/RTC-problem-in-LPC1768/m-p/596984#M32072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by gbm on Wed Feb 06 13:05:26 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;First, check if the RTC is running corectly without a battery when the main power is present. If not - check your oscillator circuit.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If yes - put a diode in series with your battery, then change the battery to a new one. Probably your LPC1768 is draining the battery while the primary power is present - this is a problem with internal VBAT switch in LPC17xx.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 21:38:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/RTC-problem-in-LPC1768/m-p/596984#M32072</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T21:38:24Z</dc:date>
    </item>
    <item>
      <title>Re: RTC problem in LPC1768</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/RTC-problem-in-LPC1768/m-p/596985#M32073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by serge on Thu Feb 07 00:23:23 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Actualy this is a known 'feature'.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The RTC clock is not very acurate on these MCU's&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Fortunately there is a way to calibrate the RTC so take a look at&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Application note &lt;/SPAN&gt;&lt;A href="http://http://www.nxp.com/documents/other/rtc_calibration_project.zip"&gt;AN10849&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 21:38:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/RTC-problem-in-LPC1768/m-p/596985#M32073</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T21:38:24Z</dc:date>
    </item>
    <item>
      <title>Re: RTC problem in LPC1768</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/RTC-problem-in-LPC1768/m-p/596986#M32074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by mtgtech on Thu Feb 07 13:13:22 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;The RTC is running correctly without the battery, with main power connected in VBAT. But yet the RTC is running advancing. I can't use the calibration of application note AN10849. I have 100 identical hardwares, and they are with different accurate. I think that this variation is very high for be simply a low accuracy of LPC. There must be some other problem.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 21:38:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/RTC-problem-in-LPC1768/m-p/596986#M32074</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T21:38:25Z</dc:date>
    </item>
    <item>
      <title>Re: RTC problem in LPC1768</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/RTC-problem-in-LPC1768/m-p/596987#M32075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by NXP_USA on Thu Feb 07 14:51:10 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;This is an unusual problem, I haven't heard of anything quite like this. Can you post the part number of the crystal that you are using and the schematic of your battery circuit?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-Dave @ NXP&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 21:38:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/RTC-problem-in-LPC1768/m-p/596987#M32075</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T21:38:26Z</dc:date>
    </item>
    <item>
      <title>Re: RTC problem in LPC1768</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/RTC-problem-in-LPC1768/m-p/596988#M32076</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by mtgtech on Thu Feb 07 17:16:42 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Dave, the part# of crystal is: MC-306 32.7680K-A0:ROHS&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;See the schematic.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 21:38:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/RTC-problem-in-LPC1768/m-p/596988#M32076</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T21:38:26Z</dc:date>
    </item>
    <item>
      <title>Re: RTC problem in LPC1768</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/RTC-problem-in-LPC1768/m-p/596989#M32077</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by NXP_USA on Fri Feb 08 16:21:29 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;We have an FAQ on crystal load caps:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://"&gt;http://www.lpcware.com/content/faq/how-calculate-value-crystal-load-capacitors&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But in this case it is not helping. It suggests that your load capacitance is too low but increasing it would decrease the oscillation frequency. (but the load caps should only have a slight impact on the oscillation frequency)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you check the frequency of the RTC oscillator? This cannot be done directly without using an active fet scope probe, but on the LPC1768 the CLKOUTCFG register can be programmed to output the RTC clock on the CLKOUT pin by writing 0b0100 to bits [3:0] and you could check it with a frequency counter or scope.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Your battery circuitry looks perfect, no diodes or anything, just as it should be. Also the battery you have chosen is Lithium Manganese Dioxide which has a nominal 3.0V output. This is good because when you power the LPC1768 from 3.3V it should be higher than the battery voltage so the battery shouldn't discharge. Sometimes people run into trouble when they use 3.4V lithium cells or a 3.0V power supply. None of this should cause the RTC to operate very slowly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you tell me whether the RTC is slow when the power is off or only when the power is on?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-Dave @ NXP&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 21:38:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/RTC-problem-in-LPC1768/m-p/596989#M32077</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T21:38:27Z</dc:date>
    </item>
    <item>
      <title>Re: RTC problem in LPC1768</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/RTC-problem-in-LPC1768/m-p/596990#M32078</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by mtgtech on Thu Feb 21 12:35:21 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Dave, I update the load capacitor to 22pF. The CLKOUTCFG has been programed for output the RTC clock. I captured the values, please see in the video:&lt;/SPAN&gt;&lt;A href="http://http://www.youtube.com/watch?v=RKOOlhzHrec&amp;amp;feature=youtu.be"&gt;http://www.youtube.com/watch?v=RKOOlhzHrec&amp;amp;feature=youtu.be&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I noticed a fluctuation in frequency, which seems to be the cause of the problem. What can cause this fluctuation?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When the circuit is power off the RTC is running good, but when circuit is power on, the RTC is advancing.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 21:38:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/RTC-problem-in-LPC1768/m-p/596990#M32078</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T21:38:28Z</dc:date>
    </item>
  </channel>
</rss>

