<?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>nRF51 RTX timer run too fast</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/4624/nrf51-rtx-timer-run-too-fast</link><description>nRF51 RTX 4.74.0-3
SoftDevice S210 V4.0.1-3 
 Created a timer for 5 seconds interval.
It turned to be 4.4 seconds. with or without softdevice enabled. 
 Anybody else has the same issue?</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 11 May 2017 16:00:57 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/4624/nrf51-rtx-timer-run-too-fast" /><item><title>RE: nRF51 RTX timer run too fast</title><link>https://devzone.nordicsemi.com/thread/16427?ContentTypeID=1</link><pubDate>Thu, 11 May 2017 16:00:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c59adf54-28de-4026-b591-9f5be1895394</guid><dc:creator>Krzysztof Zaraska</dc:creator><description>&lt;p&gt;Possibly the same issue: &lt;a href="https://devzone.nordicsemi.com/question/135485/rtx-timer-too-slow-too-fast/"&gt;devzone.nordicsemi.com/.../&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51 RTX timer run too fast</title><link>https://devzone.nordicsemi.com/thread/16432?ContentTypeID=1</link><pubDate>Thu, 04 Dec 2014 14:29:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b9ea42bc-3261-4168-b5a1-003dcab7bfb2</guid><dc:creator>Paul</dc:creator><description>&lt;p&gt;Ok I guess I got what you meant:
This is what I got in the software for enabling the soft device:
err_code = sd_softdevice_enable(NRF_CLOCK_LFCLKSRC_XTAL_50_PPM, softdevice_assert_callback);
APP_ERROR_CHECK(err_code);&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51 RTX timer run too fast</title><link>https://devzone.nordicsemi.com/thread/16431?ContentTypeID=1</link><pubDate>Wed, 03 Dec 2014 15:31:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:853c0a67-1d21-44dd-80f4-9d0ecd497ed1</guid><dc:creator>Paul</dc:creator><description>&lt;p&gt;Hi Thanks for the reply. What do you mean by &amp;quot;which clock source do you input towards the softdevice&amp;quot;? You may be hitting at something, but I need to understand your suggestions first :-)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51 RTX timer run too fast</title><link>https://devzone.nordicsemi.com/thread/16430?ContentTypeID=1</link><pubDate>Mon, 01 Dec 2014 12:58:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8afd0e8d-bac9-416e-a32b-4b17eea892d5</guid><dc:creator>Asbj&amp;#248;rn</dc:creator><description>&lt;p&gt;You say that it changes when you enable the softdevice. Which clock source do you input towards the softdevice enable call? That will override the setting you do manually.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51 RTX timer run too fast</title><link>https://devzone.nordicsemi.com/thread/16426?ContentTypeID=1</link><pubDate>Sat, 29 Nov 2014 18:25:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b297aef5-cd55-4ab7-b9ac-a0523ea27919</guid><dc:creator>Paul</dc:creator><description>&lt;p&gt;I checked the external crystal. it is running at 32.768K.
Changed the timer to 1Sec, got 740ms on the scope.&lt;/p&gt;
&lt;p&gt;I started to peel things off. of course, when I only have the timer left in the software, 1 sec is dead on.&lt;/p&gt;
&lt;p&gt;But when I start to add things back, such as enabling the softdevice, adding more timers, the 1 Sec timer speeds up more and more.&lt;/p&gt;
&lt;p&gt;I tried using TIMER2 to make a simple interrupt based timer at 125us, no problem, dead on. Just for cross checking and to see how deep is the problem.&lt;/p&gt;
&lt;p&gt;Something is funny going on here. Anybody had the same issue?&lt;/p&gt;
&lt;p&gt;Nordic Engineer please chime in. Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51 RTX timer run too fast</title><link>https://devzone.nordicsemi.com/thread/16429?ContentTypeID=1</link><pubDate>Sat, 29 Nov 2014 15:20:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9bb4f1b8-630e-4f83-aae2-fc937816d92d</guid><dc:creator>Paul</dc:creator><description>&lt;p&gt;External crystal, which is the default int RTX_Conf_CM.c&lt;/p&gt;
&lt;p&gt;int os_tick_init (void)&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;NRF_CLOCK-&amp;gt;LFCLKSRC = (CLOCK_LFCLKSRC_SRC_Xtal &amp;lt;&amp;lt; CLOCK_LFCLKSRC_SRC_Pos);
NRF_CLOCK-&amp;gt;EVENTS_LFCLKSTARTED = 0;
NRF_CLOCK-&amp;gt;TASKS_LFCLKSTART    = 1;

while (NRF_CLOCK-&amp;gt;EVENTS_LFCLKSTARTED == 0)
{
    // Do nothing.
}
NRF_RTC1-&amp;gt;PRESCALER   = OS_TRV;
NRF_RTC1-&amp;gt;INTENSET    = RTC_INTENSET_TICK_Msk;
NRF_RTC1-&amp;gt;TASKS_START = 1;

return (RTC1_IRQn);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;}&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51 RTX timer run too fast</title><link>https://devzone.nordicsemi.com/thread/16428?ContentTypeID=1</link><pubDate>Fri, 28 Nov 2014 07:46:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ac9a5c05-5f15-4f04-8967-ccd500bca032</guid><dc:creator>Asbj&amp;#248;rn</dc:creator><description>&lt;p&gt;What do you use as clock source for the RTC? I assume you&amp;#39;re using a 32 kHz perhaps? Depending on which clock source you use for the RTC, the timer will have the same accuracy. So if you for example use the non-calibrated on board 32 kHz RCOSC you will have quite &amp;quot;bad&amp;quot; accuracy on the clock source used for the timer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>