<?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 Clear task problem</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/10421/rtc-clear-task-problem</link><description>I&amp;#39;m trying to setup the RTC in the nRF52 to count with a resolution of 1mS. As the count has only a 24 bit value, I wish to clear the count every hour to start again. 
 There doesn&amp;#39;t seem to be a SHORTS register in the RTC which I would expect to be</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 19 Aug 2016 11:59:18 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/10421/rtc-clear-task-problem" /><item><title>RE: RTC Clear task problem</title><link>https://devzone.nordicsemi.com/thread/38714?ContentTypeID=1</link><pubDate>Fri, 19 Aug 2016 11:59:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a8b93190-0487-4d24-8851-0a51edc443c8</guid><dc:creator>Jean-Marc Koller</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I stumbled on a very similar problem, and also thought it was related to an engineering sample. But the problem didn&amp;#39;t disappear with the production version.&lt;/p&gt;
&lt;p&gt;However, the answer may be in this post: &lt;a href="https://devzone.nordicsemi.com/question/17522/rtc0-tick-ppi/"&gt;https://devzone.nordicsemi.com/question/17522/rtc0-tick-ppi/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I didn&amp;#39;t notice that the event routing has to be activated through EVTEN (or &amp;quot;nrf_rtc_event_enable&amp;quot;) for the RTC!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTC Clear task problem</title><link>https://devzone.nordicsemi.com/thread/38712?ContentTypeID=1</link><pubDate>Wed, 17 Aug 2016 13:37:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d5ce29db-a5f0-4a1e-a59d-e954a6d5cd2a</guid><dc:creator>LovejoySteph</dc:creator><description>&lt;p&gt;I&amp;#39;m using chips from rev. 1&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTC Clear task problem</title><link>https://devzone.nordicsemi.com/thread/38713?ContentTypeID=1</link><pubDate>Wed, 17 Aug 2016 13:19:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bfbd6ace-951b-4b47-b23f-e89dc6335945</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;I have to admit I had forgotten about this issue. Are you seeing it on rev. 1 chips also, or only on the engineering sample?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTC Clear task problem</title><link>https://devzone.nordicsemi.com/thread/38711?ContentTypeID=1</link><pubDate>Wed, 17 Aug 2016 12:41:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d6792e1b-319f-48fb-b970-60041e11ebd0</guid><dc:creator>LovejoySteph</dc:creator><description>&lt;p&gt;Hi sorry for reopening this old post.
I stumbled upon the same issue as you and I was wondering if you finally manager to solve it?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTC Clear task problem</title><link>https://devzone.nordicsemi.com/thread/38710?ContentTypeID=1</link><pubDate>Fri, 04 Dec 2015 11:57:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1165bec7-2db9-4034-936a-7f02adb58944</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;I looked at it more and it turns out that it does not work properly on my side either. The RTC is cleared once, but after that it is never cleared again. I have not found the reason for this yet, but will update the answer when i find it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTC Clear task problem</title><link>https://devzone.nordicsemi.com/thread/38709?ContentTypeID=1</link><pubDate>Mon, 30 Nov 2015 15:49:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:93767843-990b-491d-ae75-3911038417ee</guid><dc:creator>Ian Holtham</dc:creator><description>&lt;p&gt;I still can&amp;#39;t get this to work. I&amp;#39;m using the 0.92 SDK with pre-production silicon (Engineering A).&lt;/p&gt;
&lt;p&gt;We have a body of code that I&amp;#39;m getting working on the device. For this reason I&amp;#39;m using the HAL and NOT the drivers, this includes the PPI and RTC code.&lt;/p&gt;
&lt;p&gt;Everything works fine if I reset the RTC manually in my event handler by calling:&lt;/p&gt;
&lt;p&gt;nrf_rtc_task_trigger( rtc, NRF_RTC_TASK_CLEAR );&lt;/p&gt;
&lt;p&gt;But if I try to configure the PPI to reset the counter on a compare event, the clear never happens:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;uint32 hourEventAddress = nrf_rtc_event_address_get( rtc, compareChannelHourEvent );
uint32 clearTaskAddress = nrf_rtc_task_address_get( rtc, NRF_RTC_TASK_CLEAR );
nrf_ppi_channel_endpoint_setup( ppiChannel, hourEventAddress, clearTaskAddress );
nrf_ppi_channel_enable( ppiChannel );
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTC Clear task problem</title><link>https://devzone.nordicsemi.com/thread/38708?ContentTypeID=1</link><pubDate>Tue, 24 Nov 2015 10:18:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c1bba3ca-6237-43ba-b413-cfb27d71a962</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;You should be able to clear he counter using PPI. I did a quick test on nRF52 SDK 0.9.2 using the PPI driver and was able to get it to work with the following code snippet (I printed the counter value via RTT to verify that it was actually being cleared):&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;err_code = nrf_drv_ppi_channel_alloc(&amp;amp;ppi_channel);
APP_ERROR_CHECK(err_code);
err_code = nrf_drv_ppi_channel_assign(ppi_channel,
                                      nrf_rtc_event_address_get(rtc.p_reg, NRF_RTC_EVENT_COMPARE_0),
                                      nrf_rtc_task_address_get(rtc.p_reg, NRF_RTC_TASK_CLEAR));
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Here &lt;code&gt;ppi_channel&lt;/code&gt; is a &lt;code&gt;nrf_ppi_channel_t&lt;/code&gt; defined globally (or rather with file scope).&lt;/p&gt;
&lt;p&gt;If you have not solved the issue yet, maybe you can post a bit more of your code so that it is easier to get the full picture?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>