<?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>Replacement of NRF_SDH library to SoftDevice basic APIs</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/49628/replacement-of-nrf_sdh-library-to-softdevice-basic-apis</link><description>Hi, 
 I am using BLE_Blinky_Peripheral example from SDK 15.3.0 with s112 softdevice. I want to use basic softdevice APIs instead of nrf_sdh libraries for enabling BLE stack and Softdevice. I have replaced few functions. 
 Proble- 1. I am able to advertise</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 16 Jul 2019 15:29:24 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/49628/replacement-of-nrf_sdh-library-to-softdevice-basic-apis" /><item><title>RE: Replacement of NRF_SDH library to SoftDevice basic APIs</title><link>https://devzone.nordicsemi.com/thread/198772?ContentTypeID=1</link><pubDate>Tue, 16 Jul 2019 15:29:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c6d9dbe3-1a75-4083-ab81-502db1aab700</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;The priority should already have been set by the stack. You do&amp;nbsp;enable the interrupt&amp;nbsp;&lt;em&gt;&lt;strong&gt;after&amp;nbsp;&lt;/strong&gt;&lt;/em&gt;&lt;strong&gt;&lt;/strong&gt;you enable the softdevice, right?&lt;/p&gt;
&lt;p&gt;Is the SWI2_IRQHandler not called at all? Did you verify this by debugging and setting a breakpoint inside the handler?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Replacement of NRF_SDH library to SoftDevice basic APIs</title><link>https://devzone.nordicsemi.com/thread/198584?ContentTypeID=1</link><pubDate>Tue, 16 Jul 2019 05:08:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e3737390-4892-4690-84bd-933fb8b1881a</guid><dc:creator>Prajakta</dc:creator><description>&lt;p&gt;Thank you.&lt;br /&gt;I have implemented it in code.&lt;br /&gt;But still not getting event in handler.&lt;br /&gt;&lt;br /&gt;Is there any priority need to set?&lt;br /&gt;if yes, where to set?&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Replacement of NRF_SDH library to SoftDevice basic APIs</title><link>https://devzone.nordicsemi.com/thread/198029?ContentTypeID=1</link><pubDate>Fri, 12 Jul 2019 07:54:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:89408c4b-4418-428d-addd-3970e6db52e2</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;It&amp;#39;s actually one of the software interrupts, you need to redefine these as follows (or use SWI2_IRQn/SWI2_IRQHandler directly above):&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#define SD_EVT_IRQn                       (SWI2_IRQn)        /**&amp;lt; SoftDevice Event IRQ number. Used for both protocol events and SoC events. */
#define SD_EVT_IRQHandler                 (SWI2_IRQHandler)  /**&amp;lt; SoftDevice Event IRQ handler. Used for both protocol events and SoC events.&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Replacement of NRF_SDH library to SoftDevice basic APIs</title><link>https://devzone.nordicsemi.com/thread/197999?ContentTypeID=1</link><pubDate>Fri, 12 Jul 2019 07:09:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9135dd3f-8b92-4cf1-aa54-98c9a78fdcba</guid><dc:creator>Prajakta</dc:creator><description>&lt;p&gt;This IRQ handler need to define in any other files like interrupts.c or iar_startup.s file?&lt;br /&gt;If yes. Where to add?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Replacement of NRF_SDH library to SoftDevice basic APIs</title><link>https://devzone.nordicsemi.com/thread/197888?ContentTypeID=1</link><pubDate>Thu, 11 Jul 2019 14:01:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8f684126-ccf9-4fea-83ae-91789c44f620</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You can enable interrupts from the softdevice using these lines:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;ret_code_t ret_code = sd_nvic_EnableIRQ((IRQn_Type)SD_EVT_IRQn);
APP_ERROR_CHECK(ret_code);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;You must then implement the IRQ handler, where you pull for softdevice events using&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v6.1.1/group___b_l_e___c_o_m_m_o_n___f_u_n_c_t_i_o_n_s.html#ga412b12b43c253dd744bcf574d6e86f43"&gt;&lt;span&gt;sd_ble_evt_get&lt;/span&gt;&lt;/a&gt;&lt;span&gt;():&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;void SD_EVT_IRQHandler(void)
{
    __ALIGN(4) uint8_t evt_buffer[BLE_EVT_LEN_MAX(ATT_MTU)];
    uint16_t    evt_len = (uint16_t)sizeof(evt_buffer);

    ret_code = sd_ble_evt_get(evt_buffer, &amp;amp;evt_len);
    if (ret_code != NRF_SUCCESS)
    {
        break;
    }
}&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;br /&gt;Jørgen&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Replacement of NRF_SDH library to SoftDevice basic APIs</title><link>https://devzone.nordicsemi.com/thread/197736?ContentTypeID=1</link><pubDate>Thu, 11 Jul 2019 08:17:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c06857bf-d19d-473f-ae73-c8d9016ac2db</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;How to properly post source code:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/7080._5F00_Insert-Code-_2D00_-Nordic.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>