<?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>Multiple FreeRTOS Softdevice Tasks not Working</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/58505/multiple-freertos-softdevice-tasks-not-working</link><description>Hi, 
 
 I want to create 2 softdevice tasks, 1 for advertising and 1 for scanning. I have ported the dependencies and some code from the ble_app_freertos_pca10040_s132 into the ble_app_hrs_rscs_relay_ pca10040_s132 example. When I call nrf_sdh_freertos_init</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 05 Mar 2020 07:52:36 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/58505/multiple-freertos-softdevice-tasks-not-working" /><item><title>RE: Multiple FreeRTOS Softdevice Tasks not Working</title><link>https://devzone.nordicsemi.com/thread/238176?ContentTypeID=1</link><pubDate>Thu, 05 Mar 2020 07:52:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:91c95838-63c6-4fcc-8bb4-a77b1ed7eab8</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;The trick is to make sure that the advertising init isn&amp;#39;t called until the ble is initialized. and softdevice task is created.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Then you start advertising just before polling for events.&lt;/p&gt;
&lt;p&gt;If you do not do it this way, It is possible that you start advertising way ahead the softdevice_has finished initializing (it could take many milliseconds after you called the softdevice_enable, since it need to calibrate the clocks if necessary)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multiple FreeRTOS Softdevice Tasks not Working</title><link>https://devzone.nordicsemi.com/thread/238146?ContentTypeID=1</link><pubDate>Wed, 04 Mar 2020 20:44:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:868d1091-aa95-4adb-af0b-d705e40f5447</guid><dc:creator>danielco68</dc:creator><description>&lt;p&gt;How would one block the advertising task until the SD is initialized? Is there an indicator one could use to that tells me that SD is initialized. Is the stack_init function returning NRF_SUCESS not the only available indicator?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multiple FreeRTOS Softdevice Tasks not Working</title><link>https://devzone.nordicsemi.com/thread/237581?ContentTypeID=1</link><pubDate>Tue, 03 Mar 2020 02:03:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9f7ec938-06bc-40e4-9c5b-bc54b0f2064a</guid><dc:creator>VikramB</dc:creator><description>&lt;p&gt;isn&amp;#39;t the softdevice initialized in ble_stack_init? I have called that above the included code in the main function, along with the other requisite initialization functions that are present in the&amp;nbsp;&lt;span&gt;ble_app_hrs_rscs_relay_&lt;/span&gt;&lt;span&gt;pca10040_s132 example&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multiple FreeRTOS Softdevice Tasks not Working</title><link>https://devzone.nordicsemi.com/thread/237440?ContentTypeID=1</link><pubDate>Mon, 02 Mar 2020 12:58:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a4ff1a1c-c0e1-4fe6-b14a-ea187d73f5f6</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Probably because the advertising init runs before the softdevice is initialized. The SD initialization could take many milliseconds depending on the accuracy of the LF clock you are using. If you want to run them in two different threads, you need to make sure that advertising task is blocked until SD is initialized&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>