<?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>clock issue in FreeRTOS integration with Mesh code</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/36470/clock-issue-in-freertos-integration-with-mesh-code</link><description>Hi, 
 
 I&amp;#39;m using nRF52840 (rev 1.0.0) and Mesh 2.0.1 and SD 15.0.0. 
 I added FreeRTOS following the example &amp;quot;hrs FreeRTOS&amp;quot;. 
 In FreeRTOS, the source clock (configTICK_SOURCE) is configured as FREERTOS_USE_SYSTICK. 
 
 When I call nrf_drv_clock_init</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 20 Jul 2018 15:05:48 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/36470/clock-issue-in-freertos-integration-with-mesh-code" /><item><title>RE: clock issue in FreeRTOS integration with Mesh code</title><link>https://devzone.nordicsemi.com/thread/140863?ContentTypeID=1</link><pubDate>Fri, 20 Jul 2018 15:05:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b3e64d09-1303-4166-b34d-023c7fdf77d3</guid><dc:creator>Chaabane</dc:creator><description>&lt;p&gt;It seems to work by calling&lt;/p&gt;
&lt;p&gt;nrf_drv_clock_init();&lt;/p&gt;
&lt;p&gt;run FreeRTOS scheduler&lt;/p&gt;
&lt;p&gt;nrf_sdh_enable_request();&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you for your help&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: clock issue in FreeRTOS integration with Mesh code</title><link>https://devzone.nordicsemi.com/thread/140689?ContentTypeID=1</link><pubDate>Thu, 19 Jul 2018 13:58:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b56f7991-1bc4-424a-b9d0-2b6004059d58</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Malki,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Do you use nrf_sdh module to enable softdevice and handle softdevice request ? The nrf_clock module is designed with relation with nrf_sdh module.I would suggest to enable softdevice you use the nrf_sdh module instead of using mesh_softdevice_init.c&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can refer and test with my example &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/29108/how-to-add-mesh-into-nrf5-sdk-v14-1-v15-ble-application"&gt;here&lt;/a&gt;&amp;nbsp;(I use nrf_sdh in that example instead of mesh_sottdevice_init.c)&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please let me know if it works for you.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: clock issue in FreeRTOS integration with Mesh code</title><link>https://devzone.nordicsemi.com/thread/140613?ContentTypeID=1</link><pubDate>Thu, 19 Jul 2018 08:15:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:585953f9-0f90-444a-b1a3-f7aea4e884a2</guid><dc:creator>Chaabane</dc:creator><description>&lt;p&gt;I tested this on the light switch provisionner and added&amp;nbsp;nrf_drv_clock_init(); before the soft device init function, so the code looks like below but still I got the same error in&amp;nbsp;sd_softdevice_enable()&lt;/p&gt;
&lt;p&gt;I still&amp;nbsp;ge&amp;nbsp;the same error 0x1001&amp;nbsp; in&amp;nbsp;sd_softdevice_enable()&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;    ret_code_t err_code = nrf_drv_clock_init();
    APP_ERROR_CHECK(err_code);

    /* Mesh Init */
    nrf_clock_lf_cfg_t lfc_cfg = DEV_BOARD_LF_CLK_CFG;
    ERROR_CHECK(mesh_softdevice_init(lfc_cfg));
    mesh_init();&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: clock issue in FreeRTOS integration with Mesh code</title><link>https://devzone.nordicsemi.com/thread/140527?ContentTypeID=1</link><pubDate>Wed, 18 Jul 2018 13:29:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:52a543e8-a900-44de-a474-d97705105f8c</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Could you clarify, you haven&amp;#39;t start any FreeRTOS code and you have the issue ? If it&amp;#39;s the case, i would suggest to check with our default application and see why it didn&amp;#39;t work in your case.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: clock issue in FreeRTOS integration with Mesh code</title><link>https://devzone.nordicsemi.com/thread/140519?ContentTypeID=1</link><pubDate>Wed, 18 Jul 2018 12:13:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9d391d81-2c46-4a1a-a817-44ecefe1cdf6</guid><dc:creator>Chaabane</dc:creator><description>&lt;p&gt;The&amp;nbsp;&lt;span&gt;NRFX_CLOCK_CONFIG_IRQ_PRIORITY&amp;nbsp; is set to 7.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I init the clock and the softdevice before FreeRTOS&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I tried calling nrf_drv_clock_init() and then&amp;nbsp;sd_softdevice_enable() but I get the same error. Is that normal ?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: clock issue in FreeRTOS integration with Mesh code</title><link>https://devzone.nordicsemi.com/thread/140406?ContentTypeID=1</link><pubDate>Tue, 17 Jul 2018 13:50:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cf380e73-8494-4a6e-b1d1-db01bdd7ba0c</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I suspect you got that error because the call&amp;nbsp;nrfx_clock_enable() will enable the LFCLK interrupt and with high priority that not allowed by the softdevice. You should check&amp;nbsp;NRFX_CLOCK_CONFIG_IRQ_PRIORITY in sdk_config.h, it should be at 7.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Another suggestion is to call&amp;nbsp;sd_softdevice_enable() (or&amp;nbsp;nrf_sdh_enable_request)&amp;nbsp; before&amp;nbsp;initialize FREERTOS.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I actually don&amp;#39;t have much experience with FreeRTOS, so not really sure if FreeRTOS need to be initialized before the softdevice or not.&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>