<?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>Softdevice s332 v5</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/25727/softdevice-s332-v5</link><description>Hello, 
 I&amp;#39;m trying to switch from softdevice s332 v2 to s332 v5 (tried also v4), but I get this error: &amp;quot;region RAM overflowed with stack&amp;quot;.
I&amp;#39;m guessing the problem is in the linker file configuration, but I can&amp;#39;t find the proper values of RAM and FLASH</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 06 Oct 2017 07:38:13 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/25727/softdevice-s332-v5" /><item><title>RE: Softdevice s332 v5</title><link>https://devzone.nordicsemi.com/thread/101361?ContentTypeID=1</link><pubDate>Fri, 06 Oct 2017 07:38:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8278afb7-0e3c-4ff7-ab16-7550580eee08</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;It seems you have mixed up with the softdevice RAM size with the application RAM size, that you set in the linker file.&lt;/p&gt;
&lt;p&gt;To maximize the available RAM for application, the RAM ORIGIN should be set to &lt;strong&gt;0x20000000 + softdevice_ram_size&lt;/strong&gt;, and the length should be set &lt;strong&gt;chip_ram_size - ram_origin&lt;/strong&gt;. For your setup, the MEMORY settings in the linker file should look like this (for &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52/dita/nrf52/compatibility_matrix/ic_revision_overview.html?cp=2_1_3_0"&gt;nRF52832_xxAA&lt;/a&gt; chip):&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;MEMORY
{
   FLASH (rx) : ORIGIN = 0x2D000, LENGTH = 0x53000
   RAM (rwx) :  ORIGIN = 0x20001F30, LENGTH = 0xE0D0
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Note that this RAM setting is the &lt;strong&gt;minimum&lt;/strong&gt; required RAM size, your application will most likely need more. I would recommend setting the ORIGIN to 0x20004000 or 0x20005000, and check the minimum start value returned in &lt;code&gt;p_app_ram_base&lt;/code&gt; by &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s332.api.v4.0.2/group___b_l_e___c_o_m_m_o_n___f_u_n_c_t_i_o_n_s.html?cp=2_3_3_0_0_2_1_2_2_1#ga8a92420df90945526d4c89d09486508d"&gt;&lt;code&gt;sd_ble_enable()&lt;/code&gt;&lt;/a&gt;. You can then change the RAM ORIGIN to this value.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>