<?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>Re-enable softdevice</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/8730/re-enable-softdevice</link><description>Hi.
I&amp;#39;m trying to enable and disable softdevice repeatedely.
In my code, softdevice is firstly enabled then advertising properly.
After some seconds, softdevice is disabled and ESB is enabled.
It is worked properly too.
and then esb is deisabled</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 09 Feb 2017 14:02:12 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/8730/re-enable-softdevice" /><item><title>RE: Re-enable softdevice</title><link>https://devzone.nordicsemi.com/thread/32017?ContentTypeID=1</link><pubDate>Thu, 09 Feb 2017 14:02:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9ca98c76-bfbc-4b6f-9e90-9f65c05e195a</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Please post when you have it. According to our example experimental_ble_app_gzll (in multiprotocol folder) where we switch between Gazel (similar to ESB) and BLE we do need to disable all the interrupt including the RADIO_IRQn, before we switch back to BLE.
I think it makes sense to update the nrf_esb_disable() to disable RadioIRQn. I will check with the developer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Re-enable softdevice</title><link>https://devzone.nordicsemi.com/thread/32016?ContentTypeID=1</link><pubDate>Wed, 08 Feb 2017 21:04:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b5589ba5-d5f4-41d6-b4c4-cf8a635fcca1</guid><dc:creator>jrowe</dc:creator><description>&lt;p&gt;It will probably be a few days before I have time to set up a clean example than runs on the developement boards (not my own hardware), but I will do so when I can. Perhaps the problem is that I am initializing the soft device first, disabling it when I want to use ESB, and then re-initializing it when I am done with ESB. I am using version 11.0.0 of the sdk and the s132 softdevice, but I tried it with version 12.0.0 well and had the same problem.&lt;/p&gt;
&lt;p&gt;I did make one other change to the nrf_esb.h file so that I could use the app_timer module. &lt;a href="https://devzone.nordicsemi.com/question/88825/app_timer-and-nrf_esb/"&gt;see this link.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I will post thins kind of stuff as a comment in the future.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Re-enable softdevice</title><link>https://devzone.nordicsemi.com/thread/32015?ContentTypeID=1</link><pubDate>Wed, 08 Feb 2017 13:13:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:45484b61-d225-4754-87dc-8935f04c00b0</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@jrowe : I tried to init esb and then disable it then call sd_softdevice_enable but it works fine in my case. Could  you state which SDK version you used ? And better if you can provide an example that can demonstrate the issue.
Also please create a new case or put it as a comment when you have similar issue, not as an answer to the question.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Re-enable softdevice</title><link>https://devzone.nordicsemi.com/thread/32014?ContentTypeID=1</link><pubDate>Fri, 03 Feb 2017 21:42:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:da7efe56-1b72-43ad-8ea6-dd592df733d3</guid><dc:creator>Roger Clark</dc:creator><description>&lt;p&gt;Sounds like a bug that should be reported to Nordic  (if you have to modify the SDK)&lt;/p&gt;
&lt;p&gt;I think there is a thread that Nordic created to report bugs in SDK 12&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Re-enable softdevice</title><link>https://devzone.nordicsemi.com/thread/32013?ContentTypeID=1</link><pubDate>Fri, 03 Feb 2017 18:27:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9a4d501b-4702-4c65-af86-0a09c121b9e1</guid><dc:creator>jrowe</dc:creator><description>&lt;p&gt;I had exactly the same problem: when trying to re-enable my softdevice after running ESB the sd_softdevice_enable() function would return with the &amp;quot;NRF_ERROR_SDM_INCORRECT_INTERRUPT_CONFIGURATION&amp;quot;  error code.&lt;/p&gt;
&lt;p&gt;The solution that worked for me was to disable the RADIO_IRQn interrupt in the nrf_esb_disable() function inside of the nrf_esb.c file.&lt;/p&gt;
&lt;p&gt;My modified nrf_esb_disable() function looks like this.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;uint32_t nrf_esb_disable(void)
{
    m_nrf_esb_mainstate = NRF_ESB_STATE_DISABLE;

    /* Disable RADIO first. */
    NRF_RADIO-&amp;gt;INTENCLR        = 0xFFFFFFFF;
    NRF_RADIO-&amp;gt;EVENTS_DISABLED = 0;
    NRF_RADIO-&amp;gt;TASKS_DISABLE   = 1;
    while (NRF_RADIO-&amp;gt;EVENTS_DISABLED == 0) ;
    
    // Clear PPI
    NRF_PPI-&amp;gt;CHENCLR = (1 &amp;lt;&amp;lt; NRF_ESB_PPI_TIMER_START) |
                       (1 &amp;lt;&amp;lt; NRF_ESB_PPI_TIMER_STOP)  |
                       (1 &amp;lt;&amp;lt; NRF_ESB_PPI_RX_TIMEOUT)  |
                       (1 &amp;lt;&amp;lt; NRF_ESB_PPI_TX_START);

    m_nrf_esb_mainstate = NRF_ESB_STATE_IDLE;

    reset_fifos();

    memset(m_rx_pipe_info, 0, sizeof(m_rx_pipe_info));
    memset(m_pids, 0, sizeof(m_pids));

    // Disable the radio
    NVIC_DisableIRQ(ESB_EVT_IRQ);
    NRF_RADIO-&amp;gt;SHORTS = RADIO_SHORTS_READY_START_Enabled &amp;lt;&amp;lt; RADIO_SHORTS_READY_START_Pos |
                        RADIO_SHORTS_END_DISABLE_Enabled &amp;lt;&amp;lt; RADIO_SHORTS_END_DISABLE_Pos;

    // EDIT JBR: return origional priorities - turns out to be unnecessary.
    NVIC_SetPriority(RADIO_IRQn, s_radio_irq_initial_priority);
    NVIC_SetPriority(ESB_EVT_IRQ, s_esb_irq_initial_priority);
    // EDIT JBR: disable the radio interrupt! this is the one that fixes it
    NVIC_DisableIRQ(RADIO_IRQn);

    return NRF_SUCCESS;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I also reset the priorities for the interrupts back to the values that they were at before the nrf_esb_init() function changed them, but that proved to be unnecessary.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Re-enable softdevice</title><link>https://devzone.nordicsemi.com/thread/32012?ContentTypeID=1</link><pubDate>Mon, 17 Aug 2015 12:54:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9170b120-6e9f-4793-a7b6-78d9eee422ea</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@LKH: You can get the priority level by using NVIC_GetPriority or sd_nvic_GetPriority() when softdevice is enabled.
Make sure you don&amp;#39;t use interrupt priority level 0 or 2 in your application when starting softdevice.&lt;/p&gt;
&lt;p&gt;I would suggest you to test by not enabling any other interrupt /code when disable and enable the softdevice. (follow what we did in ble_app_gzll). And then gradually add your code in and see when the issue happens.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Re-enable softdevice</title><link>https://devzone.nordicsemi.com/thread/32011?ContentTypeID=1</link><pubDate>Sat, 15 Aug 2015 13:11:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6b014072-478c-48fa-8c0c-8b0f4fb3ccf2</guid><dc:creator>LKH</dc:creator><description>&lt;p&gt;Hi. I used ble_conn_params_stop() and softdevice_handler_sd_disable(), as in ble_app_gzll. I didn&amp;#39;t check the return values of sd_softdevice_enable() in the ble_app_gzll yet.&lt;/p&gt;
&lt;p&gt;And, ble_app_evt_wait() function returns 0x02 that means soft device is not enabled. (&lt;a href="https://devzone.nordicsemi.com/question/4319/sd_app_evt_wait-returns-error-code-2/)"&gt;devzone.nordicsemi.com/.../)&lt;/a&gt;
If the softdevice is already enabled, why the function ble_app_wait_evt() returns 0x02?&lt;/p&gt;
&lt;p&gt;So I think the error code 0x00001001 means &amp;quot;enabled interrupt has an illegal priority level&amp;quot;.
How can I check priority level of enabled interrupts?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Re-enable softdevice</title><link>https://devzone.nordicsemi.com/thread/32010?ContentTypeID=1</link><pubDate>Fri, 14 Aug 2015 12:11:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b6126fd3-57c5-4434-bf70-ae25e8522c7b</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Error code 0x00001001 means &amp;quot;NRF_ERROR_SDM_INCORRECT_INTERRUPT_CONFIGURATION SoftDeviceinterrupt is already enabled&amp;quot;. See the description of sd_softdevice_enable.&lt;/p&gt;
&lt;p&gt;Have you made sure you have disabled it before you enable it again ?&lt;/p&gt;
&lt;p&gt;When you testing with our ble_app_gzll do you have the same issue ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Re-enable softdevice</title><link>https://devzone.nordicsemi.com/thread/32009?ContentTypeID=1</link><pubDate>Fri, 14 Aug 2015 03:15:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2473c555-bdca-4c09-ab39-0bb81ee7f717</guid><dc:creator>LKH</dc:creator><description>&lt;p&gt;I am using ble_app_gzll for my refernce example, but the problem does not solved.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>