<?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>RTC test issue</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/61484/rtc-test-issue</link><description>Hi, 
 
 I am running an RTC unit test on the boards (nRF52840), where I take RTC_Val1 then perform a delay for one second then take another RTC_val2. 
 My condition for passing the test is: 32768 &amp;lt; RTC_val2 - RTC_val1 &amp;lt; 32768 * 1.015 ( I assume there</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 01 Oct 2020 07:05:15 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/61484/rtc-test-issue" /><item><title>RE: RTC test issue</title><link>https://devzone.nordicsemi.com/thread/272418?ContentTypeID=1</link><pubDate>Thu, 01 Oct 2020 07:05:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1b88f706-8436-4136-ab25-3d0409da7fe6</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi JK,&lt;/p&gt;
[quote user="jawadk"]the second value have to be equal to the first value + 32768. but that is nor accurate, what is the tolerance ? +-tolerance ?[/quote]
&lt;p&gt;There are several factors here. First of all, the accuracy of your 32.768 kHz clock source. If you are using a 32.768 kHz crystal, then the accuracy is whatever is specified for the crystal. If using the internal RC, the accuracy is&amp;nbsp;±500 ppm &lt;em&gt;if calibrated&lt;/em&gt;. Uncalibrated the accuracy is ±5 %. See &lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/clock.html?cp=4_0_0_4_3_3_3#unique_1494269344"&gt;electrical specification for the LFRC&lt;/a&gt; for details. If not calibrated, Secondly, there may be a delay when you sample the clock (getting&amp;nbsp;RTC_val1 and&amp;nbsp;RTC_val2). The latter should not matter on average though, if you do it the same way, but depending on how you do it you could see some jitter. (There could theoretically also be an issue with the reference clock you are using to measure 1 second).&lt;/p&gt;
&lt;p&gt;Einar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTC test issue</title><link>https://devzone.nordicsemi.com/thread/272402?ContentTypeID=1</link><pubDate>Thu, 01 Oct 2020 05:06:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8093228a-13e7-478a-b8cc-56261582aadd</guid><dc:creator>jawadk</dc:creator><description>&lt;p&gt;This is not about the wrap around.&lt;/p&gt;
&lt;p&gt;Lets say that the RTC didn&amp;#39;t wrap around.&lt;/p&gt;
&lt;p&gt;I am getting the first RTC value, then delay for 1 second and then get second RTC value.&lt;/p&gt;
&lt;p&gt;the second value have to be equal to the first value + 32768. but that is nor accurate, what is the tolerance ? +-tolerance ?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR&lt;/p&gt;
&lt;p&gt;JK&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTC test issue</title><link>https://devzone.nordicsemi.com/thread/250423?ContentTypeID=1</link><pubDate>Mon, 18 May 2020 11:48:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2c12ea55-066c-4e69-82bd-2e7bb54f5067</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi JK,&lt;/p&gt;
&lt;p&gt;It does not look like you handle that the RTC wraps around? If not, then it is expected that your test fails sometimes, when the RTC wraps around between you sampling&amp;nbsp;RTC_val1 and&amp;nbsp;RTC_val2.&lt;/p&gt;
&lt;p&gt;Einar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>