<?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>sd_ble_enable() returned ERROR 4 [NRF_ERROR_NO_MEM] at :0</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/66635/sd_ble_enable-returned-error-4-nrf_error_no_mem-at-0</link><description>I am developing an application that includes custom services. The application is updated by the bootloader. I looked up the post about NRF_ERROR_NO_MEM and modified sdk_config to reduce memory usage, but the results didn&amp;#39;t change. The question is, Does</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 05 Oct 2020 09:34:40 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/66635/sd_ble_enable-returned-error-4-nrf_error_no_mem-at-0" /><item><title>RE: sd_ble_enable() returned ERROR 4 [NRF_ERROR_NO_MEM] at :0</title><link>https://devzone.nordicsemi.com/thread/272916?ContentTypeID=1</link><pubDate>Mon, 05 Oct 2020 09:34:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d20568d3-429d-42ae-9647-471bb5737e6e</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;For the benefit of others who may have similar issues, and find this - please describe what the mistake was, how you found it, and how you fixed it.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/4035._5F00_Verify_2D00_answer_2D00_nordic_5F00_2.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_ble_enable() returned ERROR 4 [NRF_ERROR_NO_MEM] at :0</title><link>https://devzone.nordicsemi.com/thread/272856?ContentTypeID=1</link><pubDate>Mon, 05 Oct 2020 04:22:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2e5fe3d4-ce45-4ff0-b580-57a07c8fea48</guid><dc:creator>Hiroyuki Kanai</dc:creator><description>&lt;p&gt;I found a minor mistake, it works!!&lt;/p&gt;
&lt;p&gt;Thank you&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_ble_enable() returned ERROR 4 [NRF_ERROR_NO_MEM] at :0</title><link>https://devzone.nordicsemi.com/thread/272851?ContentTypeID=1</link><pubDate>Mon, 05 Oct 2020 00:48:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:185f9910-5eb1-4353-8d51-c6f13964da70</guid><dc:creator>Hiroyuki Kanai</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;00&amp;gt; &amp;lt;warning&amp;gt; nrf_sdh_ble: Insufficient RAM allocated for the SoftDevice.
00&amp;gt; 
00&amp;gt; &amp;lt;warning&amp;gt; nrf_sdh_ble: Change the RAM start location from 0x20002300 to 0x20002588.
00&amp;gt; 
00&amp;gt; &amp;lt;warning&amp;gt; nrf_sdh_ble: Maximum RAM size for application is 0x3DA78.
00&amp;gt; 
00&amp;gt; &amp;lt;error&amp;gt; nrf_sdh_ble: sd_ble_enable() returned NRF_ERROR_NO_MEM.
00&amp;gt; 
00&amp;gt; &amp;lt;error&amp;gt; app: ERROR 4 [NRF_ERROR_NO_MEM] at :0
00&amp;gt; 
00&amp;gt; PC at: 0x00000000
00&amp;gt; 
00&amp;gt; &amp;lt;error&amp;gt; app: End of error report&lt;/pre&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;Your&amp;nbsp;advice&amp;nbsp;seems&amp;nbsp;correct,&amp;nbsp;when&amp;nbsp;I&amp;nbsp;enable&amp;nbsp;Warning&amp;nbsp;and&amp;nbsp;check&amp;nbsp;the&amp;nbsp;message,&amp;nbsp;it&amp;nbsp;looks&amp;nbsp;like&amp;nbsp;this.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;I&amp;nbsp;edited&amp;nbsp;the&amp;nbsp;linker&amp;nbsp;script&amp;nbsp;and&amp;nbsp;changed&amp;nbsp;the&amp;nbsp;start&amp;nbsp;address.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;However,&amp;nbsp;as&amp;nbsp;a&amp;nbsp;result,&amp;nbsp;nothing&amp;nbsp;worked.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;&lt;span&gt;Something&amp;nbsp;seems&amp;nbsp;wrong&amp;nbsp;...&amp;nbsp;I&amp;#39;m&amp;nbsp;currently&amp;nbsp;looking&amp;nbsp;for&amp;nbsp;the&amp;nbsp;cause.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_ble_enable() returned ERROR 4 [NRF_ERROR_NO_MEM] at :0</title><link>https://devzone.nordicsemi.com/thread/272785?ContentTypeID=1</link><pubDate>Fri, 02 Oct 2020 15:56:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8a72e6c2-b06e-4074-a29c-b7aa0c09cb0c</guid><dc:creator>awneil</dc:creator><description>[quote userid="15146" url="~/f/nordic-q-a/66635/sd_ble_enable-returned-error-4-nrf_error_no_mem-at-0/272777#272777"]you should see something like this[/quote]
&lt;p&gt;You need to ensure that you have &amp;#39;warning&amp;#39; level messages enabled&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_ble_enable() returned ERROR 4 [NRF_ERROR_NO_MEM] at :0</title><link>https://devzone.nordicsemi.com/thread/272777?ContentTypeID=1</link><pubDate>Fri, 02 Oct 2020 15:00:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a3ec25bc-6a30-45dc-9baa-85e4985c0ccd</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;If you have not allocated enough memory to the SoftDevice, you should see something like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;lt;info&amp;gt; app_timer: RTC: initialized.
&amp;lt;warning&amp;gt; nrf_sdh_ble: Insufficient RAM allocated for the SoftDevice.
&amp;lt;warning&amp;gt; nrf_sdh_ble: Change the RAM start location from 0x20002AE8 to 0x20002BF0.
&amp;lt;warning&amp;gt; nrf_sdh_ble: Maximum RAM size for application is 0x1D410.
&amp;lt;error&amp;gt; nrf_sdh_ble: sd_ble_enable() returned NRF_ERROR_NO_MEM.
&amp;lt;error&amp;gt; app: ERROR 4 [NRF_ERROR_NO_MEM] at C:\nRF5 SDK\nRF5_SDK_17.0.2\examples\ble_peripheral\ble_app_uart\main.c:442
PC at: 0x0003016B
&amp;lt;error&amp;gt; app: End of error report&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Then you need to allocate the memory according to what it requires.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_ble_enable() returned ERROR 4 [NRF_ERROR_NO_MEM] at :0</title><link>https://devzone.nordicsemi.com/thread/272682?ContentTypeID=1</link><pubDate>Fri, 02 Oct 2020 09:41:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:12084ed1-e98e-420a-afc6-e2b9b78cda00</guid><dc:creator>awneil</dc:creator><description>[quote userid="93042" url="~/f/nordic-q-a/66635/sd_ble_enable-returned-error-4-nrf_error_no_mem-at-0"]includes custom services[/quote]
&lt;p&gt;Custom services do consume memory - so you do need to adjust your linker settings accordingly.&lt;/p&gt;
&lt;p&gt;IIRC, there is no specific definition or calculation of how much memory an individual Service or Characteristic takes - it&amp;#39;s just a matter of trial &amp;amp; error.&lt;/p&gt;
&lt;p&gt;&lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f61e.svg" title="Disappointed"&gt;&amp;#x1f61e;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I think there was a thread about this a while ago ...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>