<?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_init() error code 4: Insufficient RAM allocated for the SoftDevice</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/37834/ble_stack_init-error-code-4-insufficient-ram-allocated-for-the-softdevice</link><description>I&amp;#39;m using SDK version 15.0.0_a53641a on nRF52840 with softdevice s140_nrf52_6.1.0_softdevice.hex. 
 When I execute the code below in ble_stack_init (void) , I get an error code of 4 which I believe means &amp;quot; Insufficient RAM allocated for the SoftDevice</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 27 Aug 2018 23:37:25 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/37834/ble_stack_init-error-code-4-insufficient-ram-allocated-for-the-softdevice" /><item><title>RE: ble_stack_init() error code 4: Insufficient RAM allocated for the SoftDevice</title><link>https://devzone.nordicsemi.com/thread/146009?ContentTypeID=1</link><pubDate>Mon, 27 Aug 2018 23:37:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:25eaa405-a342-4639-8258-0fb4694336f9</guid><dc:creator>Nguyen Hoan Hoang</dc:creator><description>&lt;p&gt;What is showing is what you set in your ld. &amp;nbsp;If your ld setting is less than require by SD, it will update the ram_start with the correct value. &amp;nbsp;If it is already bigger than need it, it won&amp;#39;t change it. &amp;nbsp;I believe you made a typo mistake by adding an extra f to the address. &amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;3ffdc = 255KB which is much bigger then 64KB ram limit.&lt;/p&gt;
&lt;p&gt;3fdc = 15KB which is more likely the correct value.&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_init() error code 4: Insufficient RAM allocated for the SoftDevice</title><link>https://devzone.nordicsemi.com/thread/145997?ContentTypeID=1</link><pubDate>Mon, 27 Aug 2018 19:19:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1c643d71-169f-4863-b61d-a468c741e363</guid><dc:creator>run_ar</dc:creator><description>&lt;p&gt;What is the ret_code returned by sd_ble_enable in this case? And how have you configured the SD?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble_stack_init() error code 4: Insufficient RAM allocated for the SoftDevice</title><link>https://devzone.nordicsemi.com/thread/145987?ContentTypeID=1</link><pubDate>Mon, 27 Aug 2018 16:11:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:37b688a6-2c02-43ae-9426-6f7430237525</guid><dc:creator>KEITH</dc:creator><description>&lt;p&gt;I&amp;#39;m confused now. Shouldn&amp;#39;t we take the value from p_app_ram_start that we find in debug and use that value to update the value in the &amp;quot;RAM&amp;quot; line in the .ld file? Is so, then the above debugger screen shot is showing 0x2003ffdc not 0x20003fdc. Please help me understand.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble_stack_init() error code 4: Insufficient RAM allocated for the SoftDevice</title><link>https://devzone.nordicsemi.com/thread/145794?ContentTypeID=1</link><pubDate>Mon, 27 Aug 2018 01:24:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a5bbe298-0fd0-441b-b1d7-f417279b307a</guid><dc:creator>Nguyen Hoan Hoang</dc:creator><description>&lt;p&gt;exactly, your ram setting is wrong. &amp;nbsp;It should be 3fdc not 3ffdc&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble_stack_init() error code 4: Insufficient RAM allocated for the SoftDevice</title><link>https://devzone.nordicsemi.com/thread/145793?ContentTypeID=1</link><pubDate>Mon, 27 Aug 2018 00:56:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:25e07f5b-c25f-4837-a221-97b349c753ea</guid><dc:creator>KEITH</dc:creator><description>&lt;p&gt;Here is a snapshot from eclipse debugger showing&amp;nbsp;&lt;strong&gt;p_app_ram_start&lt;/strong&gt; which is the value I am supposed to use:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1535331377277v3.png" alt=" " /&gt;&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_init() error code 4: Insufficient RAM allocated for the SoftDevice</title><link>https://devzone.nordicsemi.com/thread/145792?ContentTypeID=1</link><pubDate>Sun, 26 Aug 2018 23:50:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:69ab3cde-cf9f-4fa3-b83d-98e84d7c5687</guid><dc:creator>Nguyen Hoan Hoang</dc:creator><description>&lt;p&gt;are you sure the required ram start is 3ffdc &amp;nbsp;and not 3fdc ? 3ffdc is beyond the total ram size of 0x10000 (64KB).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble_stack_init() error code 4: Insufficient RAM allocated for the SoftDevice</title><link>https://devzone.nordicsemi.com/thread/145789?ContentTypeID=1</link><pubDate>Sun, 26 Aug 2018 23:07:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a15d8ce7-5f4d-444a-aa89-c6279e7ccf16</guid><dc:creator>KEITH</dc:creator><description>&lt;p&gt;Hello Nquyen, Yes I&amp;#39;m sure it is the correct .ld file because once I make the change to RAM Origin to the new value, 0x2003ffdc, the program won&amp;#39;t event start in debug. If I change RAM Origin back to the previous value, 0x200022e0, the program will at least start in debug and execute up nrf_sdh_ble_enable command in ble_stack_init function.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble_stack_init() error code 4: Insufficient RAM allocated for the SoftDevice</title><link>https://devzone.nordicsemi.com/thread/145787?ContentTypeID=1</link><pubDate>Sun, 26 Aug 2018 20:57:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b4f7a30c-ad52-4d6a-a4c2-9be2b35d328c</guid><dc:creator>Nguyen Hoan Hoang</dc:creator><description>&lt;p&gt;Normally it should work. &amp;nbsp;Check to see if the .ld you modified is actually the one linked with your project.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>