<?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>FreeRTOS app and Softdevice runtime fault</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/54287/freertos-app-and-softdevice-runtime-fault</link><description>Hi, 
 
 I have setup the SW project to run run FreeRTOS with BLE stack initialized and nus service started without doing any further BLE use after init in runtime. Sometime I run into a fault seemingly originating from the SD memory area. 
 Two cases</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 24 Mar 2020 22:05:27 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/54287/freertos-app-and-softdevice-runtime-fault" /><item><title>RE: FreeRTOS app and Softdevice runtime fault</title><link>https://devzone.nordicsemi.com/thread/241478?ContentTypeID=1</link><pubDate>Tue, 24 Mar 2020 22:05:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cb319e17-7661-4210-a02c-a69a44d16270</guid><dc:creator>RTMerkel</dc:creator><description>&lt;p&gt;I have a similar issue; how to get MMD and FreeRTOS working together on a nRF52833 dev board.&lt;/p&gt;
&lt;p&gt;Looking at &lt;a href="https://github.com/NordicPlayground/j-link-monitoring-mode-debugging/blob/master/pca10040/s132/ses/ble_app_blinky_pca10040_s132.emProject"&gt;https://github.com/NordicPlayground/j-link-monitoring-mode-debugging/blob/master/pca10040/s132/ses/ble_app_blinky_pca10040_s132.emProject&lt;/a&gt;, it seems that project doesn&amp;#39;t support FreeRTOS as there are not external/freertos references.&lt;/p&gt;
&lt;p&gt;The issue, as I see it:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;JLINK_MONITOR.c calls app_timer_pause/resume(), which are &lt;em&gt;not defined&lt;/em&gt; in app_timer_freertos.c&lt;/li&gt;
&lt;li&gt;j-link-monitoring-mode-debugging contains app_timer2.c which &lt;em&gt;does&lt;/em&gt; define app_timer_pause/resume()&lt;/li&gt;
&lt;li&gt;examples/ble_peripheral/ble_app_hrs_freertos contains app_timer_freertos.c, and not app_timer2.c.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;My assumptions are&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;JLINK_MONITOR.c must call app_timer_pause/resume(), and&lt;/li&gt;
&lt;li&gt;&amp;nbsp;.F&lt;strong&gt;for MMD + FreeRTOS&lt;/strong&gt;, a project &lt;em&gt;must&lt;/em&gt; include app_timer_freertos.c and NOT app_timer2.c.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Is that correct?&lt;/p&gt;
&lt;p&gt;If so, then it appears that app_timer_freertos.c needs app_timer_pause/resume(). I believe FreeRTOS has timer pause and resume functions so this should be a bit issue.&lt;/p&gt;
&lt;p&gt;Thanks in advance,&lt;/p&gt;
&lt;p&gt;Randy&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: FreeRTOS app and Softdevice runtime fault</title><link>https://devzone.nordicsemi.com/thread/219933?ContentTypeID=1</link><pubDate>Wed, 13 Nov 2019 16:58:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:53fb3fc7-a85b-41b8-97d5-d0d525ef2b0e</guid><dc:creator>feran</dc:creator><description>&lt;p&gt;Thank you for the help, and the MMD tip. The debugging halts seem to have been the culprit of the issue.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: FreeRTOS app and Softdevice runtime fault</title><link>https://devzone.nordicsemi.com/thread/219725?ContentTypeID=1</link><pubDate>Tue, 12 Nov 2019 15:19:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:55ad933a-f464-4302-8705-5644336eb7eb</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Hi Feran,&amp;nbsp;&lt;/p&gt;
[quote user=""]In both cases the SEGGER debugger breaks at address 0xA60, and finally if resuming execution, we&amp;#39;ll end up in the app fault handler with origin address 0x24c92. This happens in both Debug and Release configurations and can be forced to occur more by pausing and resuming execution repeatedly. This forcing procedure is what I have been doing as preparation for this post. Normally I&amp;#39;m developing with the Debug configuration running and there the error shows up sometimes by itself.[/quote]
&lt;p&gt;After enabling the SoftDevice you cannot halt and resume execution&amp;nbsp;as this may cause the SoftDevice to HardFault. You can set breakpoints and halt at them, but we recommend resetting the chip instead of resuming execution.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It is possible to use Monitor Mode debugging to avoid this limitation,&amp;nbsp;see&amp;nbsp;&lt;a href="https://github.com/NordicPlayground/j-link-monitoring-mode-debugging/#monitor-mode-debugging-in-keil-%C2%B5vision5-and-segger-embedded-studio"&gt;https://github.com/NordicPlayground/j-link-monitoring-mode-debugging/#monitor-mode-debugging-in-keil-%C2%B5vision5-and-segger-embedded-studio&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Bjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>