<?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>Application hangs after jumping to different application (RTC1_IRQHandler)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/84061/application-hangs-after-jumping-to-different-application-rtc1_irqhandler</link><description>This is in regards to my last post here: https://devzone.nordicsemi.com/f/nordic-q-a/84016/switching-between-two-applications-using-nrf5-sdk 
 I am using FreeRTOS. 
 Both Application1 and Application2 have the same main: 
 
 The task that is spawned/created</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 27 Jan 2022 16:55:50 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/84061/application-hangs-after-jumping-to-different-application-rtc1_irqhandler" /><item><title>RE: Application hangs after jumping to different application (RTC1_IRQHandler)</title><link>https://devzone.nordicsemi.com/thread/350056?ContentTypeID=1</link><pubDate>Thu, 27 Jan 2022 16:55:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:309e9e35-fac1-462e-96ce-e20b68be42d3</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I assume you still have the RTC running when you jump to the other application. I suggest stopping it before you jump to the other application.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;nrf_rtc_task_trigger(portNRF_RTC_REG, NRF_RTC_TASK_STOP);
nrf_rtc_task_trigger(portNRF_RTC_REG, NRF_RTC_TASK_CLEAR);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;PS: If you run into any issues with the SD API calls, then&amp;nbsp;you need to remember to enable forwarding of interrupts to the Softdevice by calling nrf_dfu_mbr_init_sd().&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The problem could be that RTC1-&amp;gt;INTENSET = SYSTICK in the bootloader, and the app is started with this bit still set. So when FreeRTOS started up its scheduler, and enabled RTC1 IRQ, then SYSTICK interrupt&amp;nbsp;would trigger in addition&amp;nbsp;to&amp;nbsp;COMPARE0. This line&amp;nbsp;&lt;em&gt;nrf_rtc_int_disable(portNRF_RTC_REG, NRF_RTC_INT_TICK_MASK)&lt;/em&gt;, then fixed that.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Application hangs after jumping to different application (RTC1_IRQHandler)</title><link>https://devzone.nordicsemi.com/thread/350055?ContentTypeID=1</link><pubDate>Thu, 27 Jan 2022 16:46:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b5cb0dce-64d7-4175-96d3-bb33e7a8833f</guid><dc:creator>kcl74</dc:creator><description>&lt;p&gt;I think because FreeRTOS uses the RTC (configTICK_SOURCE == FREERTOS_USE_RTC), it enables the RTC1_IRQHandler interrupts at startup, and because the RTC interrupt is pending it prevents me from jumping.&amp;nbsp; Does this sound correct?&lt;/p&gt;
&lt;p&gt;I&amp;#39;m assuming this is the only &amp;quot;setup&amp;quot; interrupt that is enabled since the SoftDevice isn&amp;#39;t enabled until after the Application1 tries to jump to Application2.&amp;nbsp; SoftDevice is enabled in Application1 only if Application1 doesn&amp;#39;t want to jump to Application2.&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t think FreeRTOS (out-of-the-box) enables any other interrupts during startup, but can anyone verify this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>