<?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 problem</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/24361/rtc-clear-problem</link><description>Hello, 
 I&amp;#39;ve run into a problem, which seems at least to be similar to that described in another thread . In short, if I set up a counter with CC[n] and start it, a COMPARE[n] event will be generated at some point. If in the corresponding handler I</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 23 Jun 2021 12:55:02 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/24361/rtc-clear-problem" /><item><title>RE: RTC clear problem</title><link>https://devzone.nordicsemi.com/thread/316744?ContentTypeID=1</link><pubDate>Wed, 23 Jun 2021 12:55:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:693326bc-2387-4e52-9dbf-e97896148058</guid><dc:creator>Marton Schliszka</dc:creator><description>&lt;p&gt;Thank you! Yes I think so too I already found that, but due to the changes in the libraries and drivers it wasn&amp;#39;t so helpful but after all I found the solution if anyone have the same problem I paste the code here. The compare counter time variable type is changed and I add to it so the value goes up and follows rtc count. If it&amp;#39;s not the best methode feel free to correct me. :D&lt;pre class="ui-code" data-mode="text"&gt;static void rtc_handler(nrfx_rtc_int_type_t int_type){
    if (int_type == NRFX_RTC_INT_COMPARE0){
        nrf_gpio_pin_toggle(COMPARE_EVENT_OUTPUT);
        COMPARE_COUNTERTIME+=1;
        nrfx_rtc_cc_set(&amp;amp;rtc,0,COMPARE_COUNTERTIME * 8,true);    //Set compare channel to trigger interrupt after COMPARE_COUNTERTIME seconds
        
    }
    else if (int_type == NRFX_RTC_INT_TICK){
        nrf_gpio_pin_toggle(TICK_EVENT_OUTPUT);
    }
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTC clear problem</title><link>https://devzone.nordicsemi.com/thread/316724?ContentTypeID=1</link><pubDate>Wed, 23 Jun 2021 12:13:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:45c9d304-1f90-4910-8a55-6d0b2150f2a6</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi, I believe &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/8772/rtc-nrf51-sdk-example-matches-compare0-only-once/32163#32163"&gt;this&lt;/a&gt; was the linked answer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTC clear problem</title><link>https://devzone.nordicsemi.com/thread/316498?ContentTypeID=1</link><pubDate>Tue, 22 Jun 2021 13:21:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:05d3f176-50bb-4f43-92f1-5983e2a4b15f</guid><dc:creator>Marton Schliszka</dc:creator><description>&lt;p&gt;Hi, I have the same question but the linked answer is not available. Can you help me with this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTC clear problem</title><link>https://devzone.nordicsemi.com/thread/256288?ContentTypeID=1</link><pubDate>Mon, 22 Jun 2020 23:25:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:644b0c2e-1f66-4fe5-8261-19e26f40c1c6</guid><dc:creator>cwmoreiras</dc:creator><description>&lt;p&gt;Better than the verified answer&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTC clear problem</title><link>https://devzone.nordicsemi.com/thread/95921?ContentTypeID=1</link><pubDate>Tue, 15 Aug 2017 13:46:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:87f5ac83-9870-4cde-a8d1-6ca784dbc526</guid><dc:creator>NewtoM</dc:creator><description>&lt;p&gt;Ok, for me the nicest solution (without having to change the &lt;code&gt;nrf_drv_rtc.c&lt;/code&gt;) is to add the line&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;nrf_drv_rtc_int_enable(&amp;amp;rtc, NRF_RTC_INT_COMPARE0_MASK); 
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;after&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;nrf_drv_rtc_counter_clear(&amp;amp;rtc); 
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then it works.
:)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTC clear problem</title><link>https://devzone.nordicsemi.com/thread/95920?ContentTypeID=1</link><pubDate>Tue, 15 Aug 2017 13:40:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f76d52ed-1b88-499f-80b4-56a151bb2456</guid><dc:creator>NewtoM</dc:creator><description>&lt;p&gt;Thank you very much, that helped.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTC clear problem</title><link>https://devzone.nordicsemi.com/thread/95919?ContentTypeID=1</link><pubDate>Tue, 15 Aug 2017 13:11:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ab5fce99-8078-4188-8995-946506877dc0</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Please have a look at &lt;a href="https://devzone.nordicsemi.com/question/48619/rtc-nrf51-sdk-example-matches-compare0-only-once/?answer=49056#post-id-49056"&gt;this answer&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>