<?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>SDK 14 soft device manager running error</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/25535/sdk-14-soft-device-manager-running-error</link><description>I&amp;#39;m using SDK14, S132 5.0 and nRF52832, and trying to enable and disable softdevice in my application. In main function, the power management loop is like 
 while(1)
 {
 if(nrf_sdh_is_enabled( ))
 {
 app_sched_execute();
 ret_code_t ret = sd_app_evt_wait</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 29 Sep 2017 15:27:56 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/25535/sdk-14-soft-device-manager-running-error" /><item><title>RE: SDK 14 soft device manager running error</title><link>https://devzone.nordicsemi.com/thread/100676?ContentTypeID=1</link><pubDate>Fri, 29 Sep 2017 15:27:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:80bb8c09-b96e-4d7c-89f8-5f668827811a</guid><dc:creator>JiachengWang</dc:creator><description>&lt;p&gt;change the power loop as&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;app_sched_execute();
if (NRF_LOG_PROCESS() == false)
{
    if(nrf_sdh_is_enabled())
    {
        power_manage();
    }
    else
    {
        __WFE();
        __SEV();
        __WFE();
    }
}
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK 14 soft device manager running error</title><link>https://devzone.nordicsemi.com/thread/100675?ContentTypeID=1</link><pubDate>Fri, 29 Sep 2017 15:23:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:edda8737-6017-4665-9823-1db199313602</guid><dc:creator>JiachengWang</dc:creator><description>&lt;p&gt;The problem in my application is fixed by setting &lt;code&gt;#define CLOCK_ENABLED 0&lt;/code&gt; in sdk_config.h to disable nrf_drv_clock, since I found the problem is inside &lt;code&gt;sd_state_evt_handler()&lt;/code&gt; in nrf_drv_clock.c as you pointed out.&lt;/p&gt;
&lt;p&gt;It seems ANCS client is working well with CLOCK peripheral disabled.&lt;/p&gt;
&lt;p&gt;Thank you, Peter.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK 14 soft device manager running error</title><link>https://devzone.nordicsemi.com/thread/100670?ContentTypeID=1</link><pubDate>Fri, 29 Sep 2017 13:05:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e0bba61e-648e-4339-a7c3-974d77571eaf</guid><dc:creator>JiachengWang</dc:creator><description>&lt;p&gt;Yes, softdevice can be disabled by your suggested power management  loop with ANCS example. But it still can not work in my application, I&amp;#39;ll do more work to locate the problem and go back. Thank you very much.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK 14 soft device manager running error</title><link>https://devzone.nordicsemi.com/thread/100669?ContentTypeID=1</link><pubDate>Fri, 29 Sep 2017 11:54:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c7dd4e4f-1019-4e5d-8f16-8b9bcd29bd55</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;I was able to reproduce, but I&amp;#39;m not 100% sure what is going on.&lt;/p&gt;
&lt;p&gt;But, it doesn&amp;#39;t seem like a good idea to have this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;app_sched_execute();
if (NRF_LOG_PROCESS() == false)
{
  power_manage();
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Because when you are waiting for events, and your timer expires, it will be executed in app_sched_execute() then it will hit power_manager() and you will get an error because the SoftDevice is disabled. What if you do something like:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;    app_sched_execute();
    if (NRF_LOG_PROCESS() == false)
    {
        if(nrf_sdh_is_enabled())
        {
            power_manage();
        }
        else
        {
            __WFE();
            __SEV();
            __WFE();
        }
    }
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;instead?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK 14 soft device manager running error</title><link>https://devzone.nordicsemi.com/thread/100671?ContentTypeID=1</link><pubDate>Fri, 29 Sep 2017 09:52:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2a678acd-ebc0-43d9-b11c-e0accc15a30d</guid><dc:creator>JiachengWang</dc:creator><description>&lt;p&gt;I&amp;#39;m using ANCS example ble_app_ancs_c, I&amp;#39;m not sure which handler will receive  NRF_SDH_EVT_STATE_DISABLE event. But I think &lt;code&gt;nrf_fstorage_sdh_state_handler()&lt;/code&gt; should be the handler, since fstorage module is used in ANCS example.&lt;/p&gt;
&lt;p&gt;BTW, you can re-produce the problem with ANCS example in SDK 14, just add several codes line as I described above.&lt;/p&gt;
&lt;p&gt;Is there any other better code implementation? I just want to disabled softdevice after some time  and switch to a proprietary radio stack. Then after some time, enable softdevice again.&lt;/p&gt;
&lt;p&gt;Here my problem is, it seems function &lt;code&gt;nrf_sdh_disable_request()&lt;/code&gt; can not be run correctly.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK 14 soft device manager running error</title><link>https://devzone.nordicsemi.com/thread/100672?ContentTypeID=1</link><pubDate>Fri, 29 Sep 2017 09:25:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1410892a-4272-40d6-99b3-82cee9cbcf87</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;It seems you didn&amp;#39;t really answer my questions?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK 14 soft device manager running error</title><link>https://devzone.nordicsemi.com/thread/100674?ContentTypeID=1</link><pubDate>Thu, 28 Sep 2017 13:47:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d009e238-d68f-436a-8c48-6f20c8cc9e7d</guid><dc:creator>JiachengWang</dc:creator><description>&lt;p&gt;I re-edit my question to add more information at the end, please have a look, thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK 14 soft device manager running error</title><link>https://devzone.nordicsemi.com/thread/100673?ContentTypeID=1</link><pubDate>Thu, 28 Sep 2017 08:59:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:37366293-80fe-48f0-b98d-3b7afb833230</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;It is stopped? I&amp;#39;m not sure which example you are using, but I look at ble_app_hrs and it seems that the NRF_SDH_EVT_STATE_DISABLED event is sent to sd_state_evt_handler() in nrf_drv_clock.c and nrf_fstorage_sdh_state_handler() in nrf_fstorage_sd.c. Is this the case with your code as well? Are you saying that you are not reaching one of these handlers?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>