<?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>NRF52832, RTC2 and 1 second interrupt</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/75158/nrf52832-rtc2-and-1-second-interrupt</link><description>Hello everyone, 
 I am stuck at a problem that I cannot resolve myself but I see that other people in the forum don&amp;#39;t experience such a behaviour of their nrf52832s. 
 I want to have a 1 second timebase with RTC2 using the Nordic&amp;#39;s SDK version: nRF5_SDK_17</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 18 May 2021 15:29:57 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/75158/nrf52832-rtc2-and-1-second-interrupt" /><item><title>RE: NRF52832, RTC2 and 1 second interrupt</title><link>https://devzone.nordicsemi.com/thread/310227?ContentTypeID=1</link><pubDate>Tue, 18 May 2021 15:29:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ca2305a1-1eda-404d-a07b-98ac5a066f1a</guid><dc:creator>L.B.</dc:creator><description>&lt;p&gt;Hey, your code works! Thank you! I would have never guessed it!&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;L. B.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52832, RTC2 and 1 second interrupt</title><link>https://devzone.nordicsemi.com/thread/310132?ContentTypeID=1</link><pubDate>Tue, 18 May 2021 12:02:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f504ddc2-54fe-4f19-aa4c-fdd7e7044590</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Looking at the code, it should be called 1 time. But for it to trigger again, you need to do something like this in the callback.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static void rtc_handler(nrf_drv_rtc_int_type_t int_type)
{
    uint32_t err_code;
    if (int_type == NRF_DRV_RTC_INT_COMPARE0)
    {
        nrf_gpio_pin_toggle(COMPARE_EVENT_OUTPUT);
       //Set compare channel to trigger interrupt after COMPARE_COUNTERTIME seconds
        err_code = nrf_drv_rtc_cc_set(&amp;amp;rtc,0, COMPARE_COUNTERTIME*8,true);
        nrf_drv_rtc_counter_clear(&amp;amp;rtc);
    }
    else if (int_type == NRF_DRV_RTC_INT_TICK)
    {
        nrf_gpio_pin_toggle(TICK_EVENT_OUTPUT);
    }
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Depending on your application use-case, you might want to look into using app_timer instead:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/nordic/short-range-guides/b/software-development-kit/posts/application-timer-tutorial"&gt;https://devzone.nordicsemi.com/nordic/short-range-guides/b/software-development-kit/posts/application-timer-tutorial&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52832, RTC2 and 1 second interrupt</title><link>https://devzone.nordicsemi.com/thread/309759?ContentTypeID=1</link><pubDate>Fri, 14 May 2021 11:26:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:23ccd66a-6d6e-49a6-b596-efc4bbb1d3e4</guid><dc:creator>Heidi</dc:creator><description>&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Due to the holidays here in Norway we are short-staffed, so there will be some delay in your answer.&lt;/p&gt;
&lt;p&gt;You can expect an initial answer on Tuesday.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Heidi&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>