<?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>What is 3UL compare time in RTC???</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/22825/what-is-3ul-compare-time-in-rtc</link><description>In example of peripheral RTC, 
 It compares time of 3UL. 
 BUT I&amp;#39;ve never heard about any measurement of UL...
How can i transform it to second???</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 15 Jun 2017 13:03:15 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/22825/what-is-3ul-compare-time-in-rtc" /><item><title>RE: What is 3UL compare time in RTC???</title><link>https://devzone.nordicsemi.com/thread/89732?ContentTypeID=1</link><pubDate>Thu, 15 Jun 2017 13:03:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:538eefd1-219c-44b3-88e7-2bf75b1cdeec</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi Daniel,&lt;/p&gt;
&lt;p&gt;The ending UL is a way to specify that a constant in C is of type Unsigned Long. The conversion to seconds will depend on the RTC settings. In the RTC example in the SDK, the prescaler is set to 4095. The &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/rtc.html?cp=2_2_0_24_1#concept_iwc_1mj_sr"&gt;frequency of the RTC&lt;/a&gt; is given by the function:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;f_RTC [kHz] = 32.768 / (PRESCALER + 1 )
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This gives a frequency of 8 Hz with a prescaler of 4095. If you look in the RTC example, the interrupt trigger is set (using the function &lt;code&gt;nrf_drv_rtc_cc_set()&lt;/code&gt;) on the compare event given by &lt;code&gt;COMPARE_COUNTERTIME * 8&lt;/code&gt;. This indicated that &lt;code&gt;COMPARE_COUNTERTIME&lt;/code&gt; is actually given in seconds, so you can simply change 3 into whatever amount of seconds you want to use.&lt;/p&gt;
&lt;p&gt;Best regars,&lt;/p&gt;
&lt;p&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>