<?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>Problem in understanding RTC</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/11127/problem-in-understanding-rtc</link><description>Hi, can anyone explain to me about this example in this link with details :
 github.com/.../main.c 
I&amp;#39;m a newbie in nordic and i found it difficult to understand this example.
Kindly assist and reply asap. Thanks!</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 08 Jan 2016 11:37:22 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/11127/problem-in-understanding-rtc" /><item><title>RE: Problem in understanding RTC</title><link>https://devzone.nordicsemi.com/thread/41690?ContentTypeID=1</link><pubDate>Fri, 08 Jan 2016 11:37:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9dbf954a-e8b8-4366-a832-6ac798146a0f</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;I would definitely guess so. Using normal timer would make i.e. the HRM example use a lot of power. Since we from nordic didn&amp;#39;t write this library, I cannot tell for sure. If you have questions about the arduino library I would ask redbearlabs.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem in understanding RTC</title><link>https://devzone.nordicsemi.com/thread/41706?ContentTypeID=1</link><pubDate>Fri, 08 Jan 2016 04:52:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a3f12071-5529-4ab8-802a-60137031439b</guid><dc:creator>adrianwong</dc:creator><description>&lt;p&gt;Ya if i try using the code found on github, I will be getting error complaining about multiple definitions of void RTC_IRQHandler(void). Yes the ticker class is working, but it is using low power RTC? My aim is to use RTC to saving power instead of normal timer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem in understanding RTC</title><link>https://devzone.nordicsemi.com/thread/41701?ContentTypeID=1</link><pubDate>Thu, 07 Jan 2016 15:30:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3970edc9-a1b6-49e0-8995-f34d584b1d5c</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;You can use the Ticker class like is shown in the HRM example, with something like &lt;code&gt;ticker_task2.attach_us(callback_function, 100)&lt;/code&gt;. I have not tested it though to see if it actually fires every 100us. You can also try to use the code found on github, but I guess you will get a compile error complaining about multiple definitions of &lt;code&gt;void RTC_IRQHandler(void)&lt;/code&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem in understanding RTC</title><link>https://devzone.nordicsemi.com/thread/41705?ContentTypeID=1</link><pubDate>Thu, 07 Jan 2016 02:55:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:07e3d70a-bb70-4dba-9427-ad7f8383d24b</guid><dc:creator>adrianwong</dc:creator><description>&lt;p&gt;Yes i&amp;#39;m using redbear nrf51822-arduino library in my our PCB.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem in understanding RTC</title><link>https://devzone.nordicsemi.com/thread/41698?ContentTypeID=1</link><pubDate>Wed, 06 Jan 2016 11:53:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dd10dfc3-67c7-442a-87bb-385ce34cc949</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;Is this the redbearlab module (i.e. BLE nano)? I am not too familiar with programming the nRF51 from Arduino IDE.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem in understanding RTC</title><link>https://devzone.nordicsemi.com/thread/41694?ContentTypeID=1</link><pubDate>Wed, 06 Jan 2016 11:37:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4c2948d3-f58a-4e3f-92ac-ba1ea787687e</guid><dc:creator>adrianwong</dc:creator><description>&lt;p&gt;Okay. I try to find the library that can use together with Arduino IDE but I couldn&amp;#39;t find&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem in understanding RTC</title><link>https://devzone.nordicsemi.com/thread/41695?ContentTypeID=1</link><pubDate>Wed, 06 Jan 2016 11:25:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:66ea9db5-7849-4910-a231-f620269ed0d8</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;app_timer is a SDK module/library that use RTC to schedule multiple tasks regulary.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem in understanding RTC</title><link>https://devzone.nordicsemi.com/thread/41697?ContentTypeID=1</link><pubDate>Wed, 06 Jan 2016 10:26:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bc4c1faf-faa5-4d4d-adde-3bcc120f5e09</guid><dc:creator>adrianwong</dc:creator><description>&lt;p&gt;what is the different of app_timer and RTC?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem in understanding RTC</title><link>https://devzone.nordicsemi.com/thread/41704?ContentTypeID=1</link><pubDate>Wed, 06 Jan 2016 10:20:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1548d387-caeb-48b6-a567-e8ea6416a9cf</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;No, I guess you are using some SDK modules that are using app_timer, then you have no RTC left to use (SD uses RTC0 and there are only two RTC on nRF51). You could use app_timer, but the minimum time between two events is 5 ticks (152.59us with prescaler 0) as stated &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk51.v10.0.0/group__app__timer.html#ga03fb5f5fa85d16289db0d3c15bb0f24d"&gt;here&lt;/a&gt;. &lt;a href="https://devzone.nordicsemi.com/tutorials/19"&gt;Here&lt;/a&gt; is a tutorial on using app_timer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem in understanding RTC</title><link>https://devzone.nordicsemi.com/thread/41702?ContentTypeID=1</link><pubDate>Wed, 06 Jan 2016 09:43:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a43c79dc-eea5-4b73-8e32-523b54e153ee</guid><dc:creator>adrianwong</dc:creator><description>&lt;p&gt;Ok. If another library that i using now is already used RTC1 then i cannot used again right? It will show me error like &amp;quot;multiple definition of RTC1_IRQHandler&amp;quot;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem in understanding RTC</title><link>https://devzone.nordicsemi.com/thread/41703?ContentTypeID=1</link><pubDate>Wed, 06 Jan 2016 09:36:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:261acc55-ba57-4fc1-b9b4-5b1f4f669ae7</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;You cannot get 100us accurately. Since the resolution of the RTC with prescaler 0 is 30.517us, the closest number would be 91.55us. To get 100us accurately, you have to use the TIMER peripheral that is able to run at 16MHz, however this will draw a lot more power (~250uA+ from crystal). To change to RTC1 susbstitute RTC0 by RTC1.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem in understanding RTC</title><link>https://devzone.nordicsemi.com/thread/41700?ContentTypeID=1</link><pubDate>Wed, 06 Jan 2016 04:11:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:93280b8b-469b-4141-8656-3db28218c1c8</guid><dc:creator>adrianwong</dc:creator><description>&lt;p&gt;Thanks Ole Bauck. What is the best way for me to set the timer to 100us accurately? By the way, If i wanted to change from RTC0 to RTC1 i just need to substitute all RTC0 to RTC1 only right?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem in understanding RTC</title><link>https://devzone.nordicsemi.com/thread/41693?ContentTypeID=1</link><pubDate>Tue, 05 Jan 2016 12:37:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:113d67f5-9f7f-4735-b290-db2e9ba8bc7d</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;And &lt;code&gt;NRF_RTC0-&amp;gt;CC[0] = NRF_RTC0-&amp;gt;COUNTER + 32768;&lt;/code&gt; in the interrupt as the RTC is not reset unless it overflows.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem in understanding RTC</title><link>https://devzone.nordicsemi.com/thread/41692?ContentTypeID=1</link><pubDate>Tue, 05 Jan 2016 12:12:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eb870b69-c97e-4121-ba0f-9f975a11a33c</guid><dc:creator>adrianwong</dc:creator><description>&lt;p&gt;What you mean is by putting NRF_RTC0-&amp;gt;CC[0] = 32768 when NRF_RTC0-&amp;gt;PRESCALER = 0 then the IRQ handler will trigger every 1s right? Nope, this is not working.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem in understanding RTC</title><link>https://devzone.nordicsemi.com/thread/41689?ContentTypeID=1</link><pubDate>Tue, 05 Jan 2016 12:04:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:63e199aa-ba37-4b2a-8ed9-f5fe5421e808</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;With prescaler 0, the RTC will run at 32.768 KHz which means 32768 counts per second. This means that the CC[0] needs to be initialized and incremented with 32768 instead of 1000. I suggest that you read the &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.pdf.rm/nRF51_RM_v3.0.pdf"&gt;Reference Manual&lt;/a&gt; chapter about RTC to get a better understanding of how it works.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem in understanding RTC</title><link>https://devzone.nordicsemi.com/thread/41691?ContentTypeID=1</link><pubDate>Tue, 05 Jan 2016 10:47:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0fb1d7c0-7dfe-45a6-a627-b30fd6c204d3</guid><dc:creator>adrianwong</dc:creator><description>&lt;p&gt;From the code itself, how can i change the RTC interval to 1s? THrough my calculation i couldn&amp;#39;t get what i want. Kindly assist.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem in understanding RTC</title><link>https://devzone.nordicsemi.com/thread/41699?ContentTypeID=1</link><pubDate>Mon, 04 Jan 2016 12:20:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:24fb0546-4f73-4253-a9c0-d11f89241bc2</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;The comments in the code look pretty detailed already.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem in understanding RTC</title><link>https://devzone.nordicsemi.com/thread/41696?ContentTypeID=1</link><pubDate>Mon, 04 Jan 2016 10:18:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:641829c2-a99b-44e9-a6be-1875611a0ab3</guid><dc:creator>adrianwong</dc:creator><description>&lt;p&gt;Hi , what i need is can you put details comments beside the every line of the code that i sent. Then from there i can slowly figure out what is actually happen in the code. Thanks.
By the way, plus what kind of output can i expect? Currently, the code running and displayed &amp;quot;4, 2 , 1, 1, 1, 1, 1, 1, 1, 1, 1&amp;quot; by checking through serial terminal. Then it stop forever.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem in understanding RTC</title><link>https://devzone.nordicsemi.com/thread/41688?ContentTypeID=1</link><pubDate>Mon, 04 Jan 2016 09:47:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4b9ea33a-9975-446a-addf-0582112d01d5</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;Indeed - it is difficult to assist when it&amp;#39;s not clear what assistance you require!&lt;/p&gt;
&lt;p&gt;You say you are &amp;quot;a newbie in nordic&amp;quot; - do you have any prior programming experience at all? Do you have any prior experience with microcontrollers?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem in understanding RTC</title><link>https://devzone.nordicsemi.com/thread/41687?ContentTypeID=1</link><pubDate>Mon, 04 Jan 2016 09:43:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:32618333-8d98-493f-a8e8-56bac0704baf</guid><dc:creator>atune</dc:creator><description>&lt;p&gt;It&amp;#39;d be helpful to yourself and anyone responding if you could be more specific about what exactly is difficult to understand. There are only a few registers used and the product datasheet should explain most of the things sufficiently well.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>