<?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>RAM management for multiple links count and data length</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/41535/ram-management-for-multiple-links-count-and-data-length</link><description>Hello, 
 I am trying to increase the Peripheral/Central_Link_count to 10 for each or 20 in total and NRF_SDH_BLE_GAP_DATA_LENGTH above 200 
 I am getting an error when compiling &amp;quot;region RAM overflowed with stack&amp;quot; when using the settings above, I adjusted</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 20 Dec 2018 17:09:33 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/41535/ram-management-for-multiple-links-count-and-data-length" /><item><title>RE: RAM management for multiple links count and data length</title><link>https://devzone.nordicsemi.com/thread/162730?ContentTypeID=1</link><pubDate>Thu, 20 Dec 2018 17:09:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b5b2c26b-a714-4424-9282-2d6b6df23425</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;OK. I see. As far as I know none of the SDK examples uses the heap, so reducing it should not be an issue.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RAM management for multiple links count and data length</title><link>https://devzone.nordicsemi.com/thread/162328?ContentTypeID=1</link><pubDate>Tue, 18 Dec 2018 15:23:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b2bf7669-2fee-4442-a533-dab8559b0a11</guid><dc:creator>Arepa</dc:creator><description>&lt;p&gt;Hi tesc, I am doing exactly&amp;nbsp;that, changing the SD RAM length and adjusting the RAM size and length for the application.&lt;/p&gt;
&lt;p&gt;The issue I am facing is after adjusted the RAM, I got the message &amp;quot;&lt;span&gt;r&lt;/span&gt;&lt;strong&gt;egion RAM overflowed with stack&amp;quot;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I tested reducing the heap size, and it allows me compile the project, but I am not sure how it can impact my application,&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RAM management for multiple links count and data length</title><link>https://devzone.nordicsemi.com/thread/162157?ContentTypeID=1</link><pubDate>Mon, 17 Dec 2018 17:33:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f4705300-0f51-46e4-9065-56f68d52700f</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;OK now I think I see. When changing the settings, what do you change them to? You should change to the following:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;  SRAM_SOFTDEVICE (RWX) : ORIGIN = 0x20000000,  LENGTH = 0x0000AEB0
  RAM (rwx)             :  ORIGIN = 0x2000AEB0, LENGTH = 0x5150&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I.e. increase length of SoftDevice RAM and origin of application RAM, and also decrease length of application RAM. (Flash is unchanged.)&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RAM management for multiple links count and data length</title><link>https://devzone.nordicsemi.com/thread/161910?ContentTypeID=1</link><pubDate>Fri, 14 Dec 2018 15:45:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c7f91783-f160-4d5c-95f5-e9f4aafeaa5d</guid><dc:creator>Arepa</dc:creator><description>&lt;p&gt;Hi tesc, I am pretty sure I am using the nRF52832 64kb RAM version (it is a nRF52 DK)&lt;/p&gt;
&lt;p&gt;for example, using &lt;strong&gt;Peripheral&lt;/strong&gt; and &lt;strong&gt;Central&lt;/strong&gt; Link count: each 8 and NRF_SDH_BLE_GAP_DATA_LENGTH 27-150&lt;/p&gt;
&lt;p&gt;I get the following message&lt;pre class="ui-code" data-mode="text"&gt;0&amp;gt; &amp;lt;warning&amp;gt; nrf_sdh_ble: Insufficient RAM allocated for the SoftDevice.
 0&amp;gt; &amp;lt;warning&amp;gt; nrf_sdh_ble: Change the RAM start location from 0x20009470 to 0x2000AEB0.
 0&amp;gt; &amp;lt;warning&amp;gt; nrf_sdh_ble: Maximum RAM size for application is 0x5150.
 0&amp;gt; &amp;lt;error&amp;gt; nrf_sdh_ble: sd_ble_enable() returned NRF_ERROR_NO_MEM.
 0&amp;gt; &amp;lt;error&amp;gt; app: ERROR 4 [NRF_ERROR_NO_MEM] at Bluetooth_Init.cpp:128
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;using the following RAM settings&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;  FLASH_SOFTDEVICE (RX) : ORIGIN = 0x00000000,  LENGTH = 0x00026000
  FLASH (rx)            : ORIGIN = 0x26000,     LENGTH = 0x5a000
  SRAM_SOFTDEVICE (RWX) : ORIGIN = 0x20000000,  LENGTH = 0x00009470
  RAM (rwx)             :  ORIGIN = 0x20009470, LENGTH = 0x6B90&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;But If change the settings for the recommended for nrf_sdh_ble output I am unable to build my project getting this message: &amp;quot;r&lt;strong&gt;egion RAM overflowed with stack&amp;quot;&amp;nbsp;&lt;/strong&gt; does it mean the device is out of RAM?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;if I see the memory map I posted before it looks like still there is around 20kb free RAM, it is confusing.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;How recommended is to follow the steps in this post? 5years old reducing the &lt;span&gt;__HEAP_SIZE&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/1222/ld-region-ram-overflowed-with-stack"&gt;devzone.nordicsemi.com/.../ld-region-ram-overflowed-with-stack&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RAM management for multiple links count and data length</title><link>https://devzone.nordicsemi.com/thread/161893?ContentTypeID=1</link><pubDate>Fri, 14 Dec 2018 14:38:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:afd7581c-5739-431c-b0dc-0d393db5cbf3</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;What values were indicated from the NRF_ERROR_NO_MEM message, and what RAM settings did you end up with then?&lt;/p&gt;
&lt;p&gt;The total amount of RAM depends on the &lt;a href="https://www.nordicsemi.com/DocLib/Content/Comp_Matrix/nRF52832/latest/COMP/nrf52832/ic_revision_overview"&gt;nRF52832 IC revision&lt;/a&gt;. Either 32 kB or 64 kB. If that turns out not to be enough for the settings that you need for your connections then you may have to upgrade to using the &lt;a href="https://www.nordicsemi.com/DocLib/Content/Comp_Matrix/nRF52840/latest/COMP/nrf52840/nRF52840_ic_revision_overview"&gt;nRF52840&lt;/a&gt; instead, with 256 kB of RAM. But first let me know what are the SoftDevice RAM requirements for your given configuration, so I can do an assessment and tell you if I think it is feasible on the nRF52832.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RAM management for multiple links count and data length</title><link>https://devzone.nordicsemi.com/thread/161749?ContentTypeID=1</link><pubDate>Thu, 13 Dec 2018 17:23:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:67e81cc9-f927-49a0-93e9-916da388fff2</guid><dc:creator>Arepa</dc:creator><description>&lt;p&gt;Hi Tesc,&lt;/p&gt;
&lt;p&gt;The issue I&amp;nbsp;am facing is can&amp;#39;t go over 13 links count, e.g&amp;nbsp; 8 Peripheral /&amp;nbsp;6 Central&amp;nbsp;or any combination over 13, If I go over 13 links count the&amp;nbsp;sd_ble_enable returns NRF_ERROR_NO_MEM and giving a message to change the RAM amount&amp;nbsp;used for the Softdevice and the Maximum&amp;nbsp;RAM size for the application, after changing these values I am unable to build my project returning the error &amp;quot;region RAM overflowed with stack&amp;quot;&amp;nbsp; I am using gcc&amp;nbsp;to compile my project,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I need to enable more links, but I am not sure if there are limitations on the nRF52832 to be able to do it, also I am using nRF_crypto stuff on my application and I probably&amp;nbsp;could use a lot of RAM too&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Uploader my memory map when I am able to compile my project using only 13 links count:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/6443.memory_5F00_map.PNG" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RAM management for multiple links count and data length</title><link>https://devzone.nordicsemi.com/thread/161708?ContentTypeID=1</link><pubDate>Thu, 13 Dec 2018 14:34:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:79c07b42-0815-4822-9554-bdfa7100fafa</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You should be able to have 20 links total, but not for all configurations of those links. The amount of RAM needed for the SoftDevice increases with number of links and with data length settings, among other options. This means depending on the amount of RAM available on the SoC you may hit a limit on the number of links. In short it is a trade-off where you must keep the total amount of buffer space needed for the links low enough.&lt;/p&gt;
&lt;p&gt;It would not be the issue that you are linking to, as that one was if you have more than 15 links as central, and you have &amp;quot;only&amp;quot; 10 central links.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>