<?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 SDK14.2 How to retrigger RTC Compare0</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/32826/nrf52832-sdk14-2-how-to-retrigger-rtc-compare0</link><description>Hi All, 
 Based on nRF52832 SDK14.2 rtc example, I want to change it to retrigger RTC Compare0, let the LED1 also toggle every 3s, instead of keeping LED1 on. I tried to add NRF_RTC0-&amp;gt;CC[0]=0, and then nrf_drv_rtc_cc_set() in rtc_handler, however, it</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 09 Apr 2018 12:16:39 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/32826/nrf52832-sdk14-2-how-to-retrigger-rtc-compare0" /><item><title>RE: nRF52832 SDK14.2 How to retrigger RTC Compare0</title><link>https://devzone.nordicsemi.com/thread/127425?ContentTypeID=1</link><pubDate>Mon, 09 Apr 2018 12:16:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c355ea7b-90d6-4675-9ac7-84f7d07ced02</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;I suggest you you look into the RTC, GPIOTE, and PPI examples.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 SDK14.2 How to retrigger RTC Compare0</title><link>https://devzone.nordicsemi.com/thread/127309?ContentTypeID=1</link><pubDate>Sun, 08 Apr 2018 07:53:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ab3ae8d1-587b-496b-b286-4056698e1ef0</guid><dc:creator>LianXiaoYa</dc:creator><description>&lt;p&gt;Hakon,&lt;/p&gt;
&lt;p&gt;Thanks a lot for your reply. I use RTC drive with callback, and i refer to &amp;quot;blinky_rtc_freeRTOS&amp;quot; example, and add below code in rtc_handler callback, and it works as expected.&lt;/p&gt;
&lt;p&gt;For Option2, which with PPI, is there any code example that I can refer to? Thanks a lot.&lt;/p&gt;
&lt;p&gt;&lt;em&gt; err_code = nrf_drv_rtc_cc_set(&lt;/em&gt;&lt;br /&gt;&lt;em&gt; &amp;amp;m_rtc,&lt;/em&gt;&lt;br /&gt;&lt;em&gt; BLINK_RTC_CC,&lt;/em&gt;&lt;br /&gt;&lt;em&gt; (nrf_rtc_cc_get(m_rtc.p_reg, BLINK_RTC_CC) + BLINK_RTC_TICKS) &amp;amp; RTC_COUNTER_COUNTER_Msk,&lt;/em&gt;&lt;br /&gt;&lt;em&gt; true);&lt;/em&gt;&lt;br /&gt;&lt;em&gt; APP_ERROR_CHECK(err_code);&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;BR,&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;XiaoYa&lt;/em&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 SDK14.2 How to retrigger RTC Compare0</title><link>https://devzone.nordicsemi.com/thread/126784?ContentTypeID=1</link><pubDate>Wed, 04 Apr 2018 09:31:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fd4cf084-5ebd-4249-b58a-ee1abcf6e70c</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;Hey Lian,&lt;/p&gt;
&lt;p&gt;If you use the RTC driver with interrupts (callback) then you need to set the CC register in the callback because it will be cleared, you will also need to start the RTC again.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Another option is to not use the callback(do not enable interrupt), but instead fork your PPI channel to the RTCs CLEAR task. That way the RTC will reset automatically when you hit the CC value, and the CC value will remain intact. You will also need to change the GPIOTE task from &amp;#39;set&amp;#39;/&amp;#39;clear&amp;#39; to &amp;#39;toggle&amp;#39;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;Håkon.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>