<?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>APP_timer &amp;amp; RTC</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/29208/app_timer-rtc</link><description>Hi, 
 I am using nrf52832 sdk11.0.0 s132 v2.0.1. 
 In my code app_timer uses RTC1.I want to use RTC2 for counting 1 minute without disturbing the ongoing functionality. Given below are the snippets of the code: 
 #define APP_TIMER_PRESCALER 0 
#define</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 09 Jan 2018 06:26:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/29208/app_timer-rtc" /><item><title>RE: APP_timer &amp; RTC</title><link>https://devzone.nordicsemi.com/thread/116166?ContentTypeID=1</link><pubDate>Tue, 09 Jan 2018 06:26:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8bf7525a-ee3b-448b-b777-0a181d2cb416</guid><dc:creator>anuja</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thank you for the answer.In my code, in the appRTC handler, I was always comparing with the NRF_DRV_RTC_INT_COMPARE0 and inside ppi_init() function it was &amp;amp;NRF_RTC2-&amp;gt;EVENTS_COMPARE[1] which should be  :&lt;/p&gt;
&lt;p&gt;&amp;amp;NRF_RTC2-&amp;gt;EVENTS_COMPARE[0] for both the channels(3&amp;amp;7) and the count_timer variable was static which I made to global.Then in appRTCInit() function, I made initialization like below:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;nrf_drv_rtc_config_t m_default_config = NRF_DRV_RTC_DEFAULT_CONFIG(2);
	m_default_config.prescaler = 4095;
	m_default_config.interrupt_priority = 2;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;So everything is working fine now.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: APP_timer &amp; RTC</title><link>https://devzone.nordicsemi.com/thread/116165?ContentTypeID=1</link><pubDate>Tue, 09 Jan 2018 06:17:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1187458d-7721-441f-a2ec-d25a84c9387e</guid><dc:creator>anuja</dc:creator><description>&lt;p&gt;i have done that&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: APP_timer &amp; RTC</title><link>https://devzone.nordicsemi.com/thread/116164?ContentTypeID=1</link><pubDate>Fri, 05 Jan 2018 13:45:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:47a55046-87b3-4c60-a043-d212ac064184</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;You also need to enable the RTC driver after you have configured it with:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;nrf_drv_rtc_enable(&amp;amp;rtc);
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: APP_timer &amp; RTC</title><link>https://devzone.nordicsemi.com/thread/116160?ContentTypeID=1</link><pubDate>Fri, 05 Jan 2018 12:12:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:63309352-8de3-489a-a5a0-1e6fae185d82</guid><dc:creator>anuja</dc:creator><description>&lt;p&gt;In the rtc handler function, I have this line: int_type == NRF_DRV_RTC_INT_COMPARE0 and I have declared in NRF_DRV_RTC_INSTANCE(2).Whether  this COMPARE0 register belongs to RTC0 or RTC2?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: APP_timer &amp; RTC</title><link>https://devzone.nordicsemi.com/thread/116163?ContentTypeID=1</link><pubDate>Fri, 05 Jan 2018 07:58:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e25354c0-d028-4897-88ce-47ea39253d73</guid><dc:creator>anuja</dc:creator><description>&lt;p&gt;okay as mentioned in the above code still in the appRTChandler function if I put the breakpoint the flow doesn&amp;#39;t stop at that point. This particular snippet works only for the first time but if we run the same code again even though I can see even if this condition is true:  if(count_timer== (timer_minutes[3]-0x30)) the code doesn&amp;#39;t stop at the provided breakpoint. It didn&amp;#39;t give an error but executing some task that I Cant interpret.
what can be done for this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: APP_timer &amp; RTC</title><link>https://devzone.nordicsemi.com/thread/116162?ContentTypeID=1</link><pubDate>Fri, 05 Jan 2018 07:49:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:180d3b7b-fe72-4f38-b88d-d7358f1318c0</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;Yes, that should be right.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: APP_timer &amp; RTC</title><link>https://devzone.nordicsemi.com/thread/116161?ContentTypeID=1</link><pubDate>Fri, 05 Jan 2018 05:31:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8b82f1dd-cc24-4741-b465-4f81ee288dee</guid><dc:creator>anuja</dc:creator><description>&lt;p&gt;I forgot to tell before I am doing :
const  nrf_drv_rtc_t rtc = NRF_DRV_RTC_INSTANCE(2);  at the top of the code. Is it right ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: APP_timer &amp; RTC</title><link>https://devzone.nordicsemi.com/thread/116159?ContentTypeID=1</link><pubDate>Thu, 04 Jan 2018 15:22:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3520e867-5185-4ede-aaae-681b5131c7c9</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The way you are initializing the RTC sets the interrupt priority to 0. This level is &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.sds/dita/softdevices/s130/processor_avail_interrupt_latency/exception_mgmt_sd.html?cp=2_3_1_0_15_1"&gt;reserved for the Softdevice&lt;/a&gt;.   Try to initialize your RTC like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;nrf_drv_rtc_config_t rtc_config = NRF_DRV_RTC_DEFAULT_CONFIG(2);
rtc_config.prescaler = 4095;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Or use any of the interrupts reserved for the application like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;rtc_config.interrupt_priority = 7;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;(note that level 5 is not available to the application in S132 v2.0.1).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>