<?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>BLE stack initialization stucks</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/67921/ble-stack-initialization-stucks</link><description>Hello, 
 I want to use the code from the BLE template in my own application and so I copied all necessary files into the project, but the code stucks at 
 
 I have debugged the project and found out that the code never returns from 
 
 in &amp;quot;nrf_sdm.h&amp;quot;</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 04 Nov 2020 11:20:13 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/67921/ble-stack-initialization-stucks" /><item><title>RE: BLE stack initialization stucks</title><link>https://devzone.nordicsemi.com/thread/278417?ContentTypeID=1</link><pubDate>Wed, 04 Nov 2020 11:20:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5a168e08-d7d2-4fff-8280-22704690f84e</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Thanks, I will follow up in the other ticket you created. It appears to be a different error now.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE stack initialization stucks</title><link>https://devzone.nordicsemi.com/thread/278416?ContentTypeID=1</link><pubDate>Wed, 04 Nov 2020 11:16:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:51561fec-4f0c-4186-890c-dbc0a1e58e94</guid><dc:creator>Kampino</dc:creator><description>&lt;p&gt;It seems that the error comes from my PPI and timer initialization. Anyway, I have opened a private ticket, so you can debug my project.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE stack initialization stucks</title><link>https://devzone.nordicsemi.com/thread/278412?ContentTypeID=1</link><pubDate>Wed, 04 Nov 2020 10:41:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fa215bc6-7ddb-4ffb-beff-589b03d60ab1</guid><dc:creator>Kampino</dc:creator><description>&lt;p&gt;Yes I can to it. Let me check how I can achieve this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE stack initialization stucks</title><link>https://devzone.nordicsemi.com/thread/278406?ContentTypeID=1</link><pubDate>Wed, 04 Nov 2020 10:29:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:207c0dd2-61f3-490b-a857-2e0ad36e9ca8</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Suprised you still get the same error after removing initialization of the other peripherals. Are you able to share your project here or in a private support ticket so I can try debug it?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE stack initialization stucks</title><link>https://devzone.nordicsemi.com/thread/278400?ContentTypeID=1</link><pubDate>Wed, 04 Nov 2020 10:11:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:83ed6341-31a0-4b3b-bee0-113aa08d3779</guid><dc:creator>Kampino</dc:creator><description>&lt;p&gt;mmh I don&amp;acute;t see any invalid interrupt priorities. I use the default configuration for each device and even when I comment out the initialization of all other peripherals the error still exist.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE stack initialization stucks</title><link>https://devzone.nordicsemi.com/thread/278388?ContentTypeID=1</link><pubDate>Wed, 04 Nov 2020 09:39:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8791088b-bf7f-414d-a22c-4815754a899e</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;It&amp;#39;s defined in nrf_error_sdm.h:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#define NRF_ERROR_SDM_INCORRECT_INTERRUPT_CONFIGURATION (NRF_ERROR_SDM_BASE_NUM + 1)  ///&amp;lt; Incorrect interrupt configuration (can be caused by using illegal priority levels, or having enabled SoftDevice interrupts).&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE stack initialization stucks</title><link>https://devzone.nordicsemi.com/thread/278386?ContentTypeID=1</link><pubDate>Wed, 04 Nov 2020 09:37:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1f3310b1-02fa-453a-b545-feeb32a1750b</guid><dc:creator>Kampino</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;why do you think it is the error&amp;nbsp;&lt;span&gt;NRF_ERROR_SDM_INCORRECT_INTERRUPT_CONFIGURATION? When I take a look at &amp;quot;nrf_error.h&amp;quot; I get the base &amp;quot;NRF_ERROR_SDM_BASE_NUM&amp;quot; and the error &amp;quot;NRF_ERROR_SVC_HANDLER_MISSING&amp;quot;.&lt;br /&gt;Do I understand it wrong?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE stack initialization stucks</title><link>https://devzone.nordicsemi.com/thread/278382?ContentTypeID=1</link><pubDate>Wed, 04 Nov 2020 09:09:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9b1deb25-4fff-4935-bf50-23e42f8c4f5d</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Error 4097=0x1001 corresponds to NRF_ERROR_SDM_INCORRECT_INTERRUPT_CONFIGURATION and will be returned from sd_softdevice_enable() if you have enabled an IRQ vector with one of the interrupt priorities reserved to the Softdevice (&lt;span class="item"&gt;&lt;a class="" title="Interrupt priority levels" href="https://infocenter.nordicsemi.com/topic/sds_s132/SDS/s1xx/processor_avail_interrupt_latency/exception_mgmt_sd.html?cp=4_7_3_0_15_1"&gt;Interrupt priority levels&lt;/a&gt;&lt;/span&gt;). SDK examples usually use interrupt priority &amp;#39;6&amp;#39; for application interrutps.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE stack initialization stucks</title><link>https://devzone.nordicsemi.com/thread/278370?ContentTypeID=1</link><pubDate>Wed, 04 Nov 2020 08:32:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8322a847-24a8-4a3f-86c0-6baa0ab1c46b</guid><dc:creator>Kampino</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;&lt;br /&gt;thank you for the help. The application doesn&amp;acute;t stuck anymore but will jump into the error handler(error 4097).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE stack initialization stucks</title><link>https://devzone.nordicsemi.com/thread/278367?ContentTypeID=1</link><pubDate>Wed, 04 Nov 2020 07:41:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9bc464d3-09bf-4290-a832-207f94166112</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;The application is supposed to run on top of the Softdevice as you can see from the memory layout here in the Softdevice specification: &lt;span&gt;&lt;a title="Memory resource map and usage" href="https://infocenter.nordicsemi.com/topic/sds_s132/SDS/s1xx/mem_usage/mem_resource_map_usage.html?cp=4_7_3_0_13_0"&gt;Memory resource map and usage. &lt;/a&gt;&lt;/span&gt;&lt;span&gt;So you will need to change the linker settings of your app so it doesn&amp;#39;t overlap with the Softdevice.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span&gt;Relevant linker settings from BLE template example in SDK 17.0.2&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/4186.pastedimage1604475643790v1.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;strong&gt;And the setting to make Embedded Studio program the Softdevice toghether with the application image&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/4118.pastedimage1604475735479v2.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE stack initialization stucks</title><link>https://devzone.nordicsemi.com/thread/278331?ContentTypeID=1</link><pubDate>Tue, 03 Nov 2020 18:46:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aea4d57f-edd4-46db-a5ec-4665ff02b8ff</guid><dc:creator>Kampino</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;&lt;br /&gt;sorry I missed it again...&lt;br /&gt;It is an nRF52 DK with no modifications. Please take a look at the screenshot. I hope it helps.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x163/__key/communityserver-discussions-components-files/4/6685.Error.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE stack initialization stucks</title><link>https://devzone.nordicsemi.com/thread/278297?ContentTypeID=1</link><pubDate>Tue, 03 Nov 2020 14:14:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c5172803-827b-45ad-8eda-028abcae848b</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Ok, so it still hangs after you&amp;#39;ve changed the clock source? Is it a custom board or a nordic DK? Maybe you post a screenshot showing the CPU registers and disassembly when it hangs?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE stack initialization stucks</title><link>https://devzone.nordicsemi.com/thread/278291?ContentTypeID=1</link><pubDate>Tue, 03 Nov 2020 13:56:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1c3a75ff-4465-425c-87f5-bb1844c00503</guid><dc:creator>Kampino</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;yes a 32 kHz crystal is mounted and I update the config file according to your example.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE stack initialization stucks</title><link>https://devzone.nordicsemi.com/thread/278282?ContentTypeID=1</link><pubDate>Tue, 03 Nov 2020 13:38:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fc87bb92-1e1a-4f4f-94de-d6b9a8f2cb1a</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;It&amp;#39;s almost always a problem with the clock source selection when the program hangs in sd_softdevice_enable(). Does your board have a 32KHz crystal mounted? If not, the p_clock_lf_cfg argument which specifies what clock source the Softdevice shall use must be set to use the &lt;span&gt;&lt;a title="32.768 kHz RC oscillator (LFRC)" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/clock.html?cp=4_2_0_18_1_0#concept_acb_q5y_2q"&gt;LFRC.&lt;/a&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span&gt;sdk_config.h settings to use internal RC oscillator with periodic calibration:&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;//==========================================================

// &amp;lt;h&amp;gt; Clock - SoftDevice clock configuration

//==========================================================
// &amp;lt;o&amp;gt; NRF_SDH_CLOCK_LF_SRC  - SoftDevice clock source.
 
// &amp;lt;0=&amp;gt; NRF_CLOCK_LF_SRC_RC 
// &amp;lt;1=&amp;gt; NRF_CLOCK_LF_SRC_XTAL 
// &amp;lt;2=&amp;gt; NRF_CLOCK_LF_SRC_SYNTH 

#ifndef NRF_SDH_CLOCK_LF_SRC
#define NRF_SDH_CLOCK_LF_SRC 0
#endif

// &amp;lt;o&amp;gt; NRF_SDH_CLOCK_LF_RC_CTIV - SoftDevice calibration timer interval. 
#ifndef NRF_SDH_CLOCK_LF_RC_CTIV
#define NRF_SDH_CLOCK_LF_RC_CTIV 2
#endif

// &amp;lt;o&amp;gt; NRF_SDH_CLOCK_LF_RC_TEMP_CTIV - SoftDevice calibration timer interval under constant temperature. 
// &amp;lt;i&amp;gt; How often (in number of calibration intervals) the RC oscillator shall be calibrated
// &amp;lt;i&amp;gt;  if the temperature has not changed.

#ifndef NRF_SDH_CLOCK_LF_RC_TEMP_CTIV
#define NRF_SDH_CLOCK_LF_RC_TEMP_CTIV 16
#endif

// &amp;lt;o&amp;gt; NRF_SDH_CLOCK_LF_ACCURACY  - External clock accuracy used in the LL to compute timing.
 
// &amp;lt;0=&amp;gt; NRF_CLOCK_LF_ACCURACY_250_PPM 
// &amp;lt;1=&amp;gt; NRF_CLOCK_LF_ACCURACY_500_PPM 
// &amp;lt;2=&amp;gt; NRF_CLOCK_LF_ACCURACY_150_PPM 
// &amp;lt;3=&amp;gt; NRF_CLOCK_LF_ACCURACY_100_PPM 
// &amp;lt;4=&amp;gt; NRF_CLOCK_LF_ACCURACY_75_PPM 
// &amp;lt;5=&amp;gt; NRF_CLOCK_LF_ACCURACY_50_PPM 
// &amp;lt;6=&amp;gt; NRF_CLOCK_LF_ACCURACY_30_PPM 
// &amp;lt;7=&amp;gt; NRF_CLOCK_LF_ACCURACY_20_PPM 
// &amp;lt;8=&amp;gt; NRF_CLOCK_LF_ACCURACY_10_PPM 
// &amp;lt;9=&amp;gt; NRF_CLOCK_LF_ACCURACY_5_PPM 
// &amp;lt;10=&amp;gt; NRF_CLOCK_LF_ACCURACY_2_PPM 
// &amp;lt;11=&amp;gt; NRF_CLOCK_LF_ACCURACY_1_PPM 

#ifndef NRF_SDH_CLOCK_LF_ACCURACY
#define NRF_SDH_CLOCK_LF_ACCURACY 1
#endif
&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Vidar&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>