<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>nRF52832 RTC inaccuracy LF CLK?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/52809/nrf52832-rtc-inaccuracy-lf-clk</link><description>Hi. We are using RTC2 in our application to trigger an event at 256Hz. We also have a compare running to trigger a compare event at 32Hz. 
 I have found that over an hour, event will have been running slowly about 98% of the rate it should be. Below is</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 02 Oct 2019 14:15:27 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/52809/nrf52832-rtc-inaccuracy-lf-clk" /><item><title>RE: nRF52832 RTC inaccuracy LF CLK?</title><link>https://devzone.nordicsemi.com/thread/213032?ContentTypeID=1</link><pubDate>Wed, 02 Oct 2019 14:15:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:070484df-689c-4ccb-990e-913c70726bcf</guid><dc:creator>Philip</dc:creator><description>&lt;p&gt;I think I have solved the issue.&lt;/p&gt;
&lt;p&gt;I completely removed the compare part of the RTC and compare event and the tick event is now accurate.&lt;/p&gt;
&lt;p&gt;I have moved the code I was running in the compare event, into the tick with a counter so it only happens every 8 ticks.&lt;/p&gt;
&lt;p&gt;Phil&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 RTC inaccuracy LF CLK?</title><link>https://devzone.nordicsemi.com/thread/212985?ContentTypeID=1</link><pubDate>Wed, 02 Oct 2019 11:47:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4d62608b-297e-413e-a22c-fdfa97151bea</guid><dc:creator>Philip</dc:creator><description>&lt;p&gt;Thanks Kenneth.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Yes I determined I am using the XTAL source as softdevice is running and&amp;nbsp;&lt;span&gt;#define NRF_SDH_CLOCK_LF_SRC 1 in config.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Still getting quite a big error though.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Phil&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 RTC inaccuracy LF CLK?</title><link>https://devzone.nordicsemi.com/thread/212976?ContentTypeID=1</link><pubDate>Wed, 02 Oct 2019 11:20:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f83ff362-d992-4273-a5af-862ed3aa2d74</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;The accuracy when using internal LF RC is up to &amp;lt;500ppm (&amp;lt;0.05%),&amp;nbsp;however this is given that that LF RC is calibrated (for instance this is done automatically if you have enabled the softdevice with internal LF RC as source). If you need more accurate source than that you need to use external XTAL as LF source, then you may for instance have &amp;lt;20ppm (&amp;lt;0.002%). If you are using RTC then make sure that you have started the LF souce you want to use first (for instance by enable softdevice), else it likely will just use the internal LF RC without calibration (&amp;gt;&amp;gt;0.05%).&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 RTC inaccuracy LF CLK?</title><link>https://devzone.nordicsemi.com/thread/212962?ContentTypeID=1</link><pubDate>Wed, 02 Oct 2019 10:41:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:508e602c-2894-4eef-af0a-71c657f90faa</guid><dc:creator>Philip</dc:creator><description>&lt;p&gt;Oh I found this in the sdk_config so must be using the correct LF_CLK source.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;// &amp;lt;0=&amp;gt; NRF_CLOCK_LF_SRC_RC &lt;br /&gt;// &amp;lt;1=&amp;gt; NRF_CLOCK_LF_SRC_XTAL &lt;br /&gt;// &amp;lt;2=&amp;gt; NRF_CLOCK_LF_SRC_SYNTH&lt;/p&gt;
&lt;p&gt;#ifndef NRF_SDH_CLOCK_LF_SRC&lt;br /&gt;#define NRF_SDH_CLOCK_LF_SRC 1&lt;br /&gt;#endif&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So RTC is inaccurate. How does the priority effect accuracy? It doesn&amp;#39;t matter if an event is slightly late due to event priorities but shouldn&amp;#39;t the next one be fired exactly 1/256 after the first and so on?&lt;/p&gt;
&lt;p&gt;thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>