<?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>RTC1 Initialisation with soft device</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/12777/rtc1-initialisation-with-soft-device</link><description>I am building my application up on the blinky free rtos. I want to use RTC and ble stack. i am initialising RTC1 first and ble stack stact. 
 The problem is that I am getting 0x1001 error code (which stands for &amp;quot;Incorrect interrupt configuration&amp;quot;) from</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 31 Mar 2016 13:33:17 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/12777/rtc1-initialisation-with-soft-device" /><item><title>RE: RTC1 Initialisation with soft device</title><link>https://devzone.nordicsemi.com/thread/48564?ContentTypeID=1</link><pubDate>Thu, 31 Mar 2016 13:33:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:570ceaa6-d226-4c63-991a-134fb911ff4b</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;@Anders - might be good to put that (use of RTC) in the SDK notes for the FreeRTOS port, the notes for the other RTOS port says it uses RTC1, but I don&amp;#39;t think the FreeRTOS one does, or perhaps I totally missed it.&lt;/p&gt;
&lt;p&gt;The only reason I asked about the IRQ priority - well apart from that being the error code - is that during the switch from nRF51 to nRF52, and the removal of the old APP_PRIORITY macros, there was more than once I ended up with a hard-coded &amp;#39;1&amp;#39; for an IRQ priority in code intended for both platforms. That&amp;#39;s high on the nRF51, but on the nRF52 it&amp;#39;s a softdevice-used value. Since it&amp;#39;s in the config file and that&amp;#39;s subject to being edited a lot, actually checking the value being used seemed like a good idea.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTC1 Initialisation with soft device</title><link>https://devzone.nordicsemi.com/thread/48563?ContentTypeID=1</link><pubDate>Thu, 31 Mar 2016 10:47:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aa2846d4-cf72-4480-a612-98c67703637b</guid><dc:creator>Anders Strand</dc:creator><description>&lt;p&gt;The freertos in our SDK uses RTC1 as a tick clock. From portmacro_cmsis.h line 120:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;/* RTC register */
#define portNRF_RTC_REG        NRF_RTC1
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;By using the RTC instead of Systick, we can implement tickless idle mode.&lt;/p&gt;
&lt;p&gt;Are you using the freertos port provided in our SDK, or have you made your own port?&lt;/p&gt;
&lt;p&gt;@RK, in my config the i have the following definition of RTC2_CONFIG_IRQ_PRIORITY:
APP_IRQ_PRIORITY_LOW =_PRIO_APP_LOW = 6&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTC1 Initialisation with soft device</title><link>https://devzone.nordicsemi.com/thread/48562?ContentTypeID=1</link><pubDate>Wed, 30 Mar 2016 03:30:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:44a82d2e-bd94-4966-9df6-06a0c9862ca3</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;.. actually looking at the nRF52 FreeRTOS port I&amp;#39;m not entirely sure what it does use as a timer source. The notes don&amp;#39;t say, it does define the portable systick macro as RTC1 as the nrf51 port does but without following all the includes I can&amp;#39;t work out whether it manages to use systick after all. I don&amp;#39;t quite see how it does, as Systick doesn&amp;#39;t tick when the processor sleeps, which means there&amp;#39;s nothing to wake tasks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTC1 Initialisation with soft device</title><link>https://devzone.nordicsemi.com/thread/48561?ContentTypeID=1</link><pubDate>Wed, 30 Mar 2016 02:51:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:68571412-8278-45b0-969c-4fe9438e2752</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;Systick won&amp;#39;t work - not if you sleep the chip at all, you should use one of the nRF52 ports if you want FreeRTOS to work properly.&lt;/p&gt;
&lt;p&gt;What is the numerical value of the IRQ priority, what actual number are you using? I keep asking you this, I can&amp;#39;t see your nrf_drv_config.h file.&lt;/p&gt;
&lt;p&gt;Similarly what priorities has the RTOS set for other peripherals, if it&amp;#39;s set Systick to a high interrupt priority - that won&amp;#39;t work either. I suggest dumping the contents of the NVIC enabled and priority registers just before the softdevice enable call and finding what&amp;#39;s enabled and what priorities they have. The error message is pretty clear - one of your interrupt priorities at least is wrong, you just need to look at them all and find out which one.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTC1 Initialisation with soft device</title><link>https://devzone.nordicsemi.com/thread/48560?ContentTypeID=1</link><pubDate>Wed, 30 Mar 2016 02:20:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a821293d-feee-464b-934f-dafa2f85effe</guid><dc:creator>Krishna</dc:creator><description>&lt;p&gt;Sorry SysTick, I am using nrF52.&lt;/p&gt;
&lt;p&gt;RTC2_CONFIG_IRQ_PRIORITY  has low priority. It defined in nrf_drv_config.h&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTC1 Initialisation with soft device</title><link>https://devzone.nordicsemi.com/thread/48559?ContentTypeID=1</link><pubDate>Wed, 30 Mar 2016 00:22:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:84d3947a-5502-4443-a414-c73d6cc7d4ed</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;What do you mean by &amp;#39;SystemCore Clock&amp;#39;? Do you mean SysTick? Which chip are you using, nRF51 or nRF52? Systick doesn&amp;#39;t tick when the device sleeps so that won&amp;#39;t work, the RTOS ports for nRF5x use RTC1 because nRF51 doesn&amp;#39;t have Systick and nRF52 does but it&amp;#39;s not usable as an always-on timer.&lt;/p&gt;
&lt;p&gt;RTC2_CONFIG_IRQ_PRIORITY is a define, what have you defined it as?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTC1 Initialisation with soft device</title><link>https://devzone.nordicsemi.com/thread/48558?ContentTypeID=1</link><pubDate>Tue, 29 Mar 2016 18:39:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:20e7d486-b76a-48f3-94ce-4d0bad106fa0</guid><dc:creator>Krishna</dc:creator><description>&lt;p&gt;We are using FreeRTOS, BLESTACK and RTC.&lt;/p&gt;
&lt;p&gt;FreeRTOS uses SystemCore Clock,RTC0 is blocked by the Soft-device.&lt;/p&gt;
&lt;p&gt;We are trying to use RTC1/RTC2 for tick events. When we try to enable the tick event for RTC1 or RTC2 we are getting below shown error. Below Error was displayed by enabling DEBUG.&lt;/p&gt;
&lt;p&gt;ID=4097  pc=121272  info=2048,&lt;/p&gt;
&lt;p&gt;I am assigning RTC2_CONFIG_IRQ_PRIORITY&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTC1 Initialisation with soft device</title><link>https://devzone.nordicsemi.com/thread/48557?ContentTypeID=1</link><pubDate>Tue, 29 Mar 2016 10:58:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:753d656f-4f5b-47db-a9e7-083eaa128bc4</guid><dc:creator>Anders Strand</dc:creator><description>&lt;p&gt;What RK said. See &lt;a href="https://devzone.nordicsemi.com/question/60125/my-device-is-freezing-and-restarting/?answer=60126#post-id-60126"&gt;this&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTC1 Initialisation with soft device</title><link>https://devzone.nordicsemi.com/thread/48566?ContentTypeID=1</link><pubDate>Sat, 26 Mar 2016 13:44:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7be078a4-7e85-4ca0-8c66-f2f366a0f3e4</guid><dc:creator>Krishna</dc:creator><description>&lt;p&gt;const nrf_drv_rtc_t rtc = NRF_DRV_RTC_INSTANCE(2);&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;nrf_drv_rtc_config_t p_config;

p_config.interrupt_priority = RTC2_CONFIG_IRQ_PRIORITY; 
p_config.prescaler = 32; 
p_config.reliable = false; 
p_config.tick_latency = RTC_US_TO_TICKS(NRF_MAXIMUM_LATENCY_US, CONCAT_3(RTC, 2, _CONFIG_FREQUENCY));

err_code = nrf_drv_rtc_init(&amp;amp;rtc, &amp;amp;p_config, rtc0_event_handler);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I am assigning RTC2_CONFIG_IRQ_PRIORITY&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTC1 Initialisation with soft device</title><link>https://devzone.nordicsemi.com/thread/48565?ContentTypeID=1</link><pubDate>Sat, 26 Mar 2016 00:32:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4d909d3e-545b-4e79-a2fb-ece849757b51</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;So what interrupt priority have you set for RTC1? If you haven&amp;#39;t set it explicitly then it&amp;#39;s zero and zero isn&amp;#39;t available to you with the softdevice. The error message tells you exactly that.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTC1 Initialisation with soft device</title><link>https://devzone.nordicsemi.com/thread/48556?ContentTypeID=1</link><pubDate>Fri, 25 Mar 2016 00:05:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5589b08e-f528-473c-a748-2553977db26b</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;Usual questions. &amp;#39;Controller reset&amp;#39; usually means you&amp;#39;re in the app error handler, are you, put a breakpoint in and find out  - then see which system function returned an error.&lt;/p&gt;
&lt;p&gt;And post some code&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>