<?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>Bluetooth long range (coded PHY) on nrf52811 using nRF connect SDK - Provided examples use too much SRAM</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/85371/bluetooth-long-range-coded-phy-on-nrf52811-using-nrf-connect-sdk---provided-examples-use-too-much-sram</link><description>Hi, 
 I have my programming environment set up to use the nRF Connect SDK through VS Code, as the most recent documentation suggests. I can successfully build and flash code onto my nRF52840-DK (PCA10056). My goal at the moment is to do a simple proof</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 03 Mar 2022 13:50:08 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/85371/bluetooth-long-range-coded-phy-on-nrf52811-using-nrf-connect-sdk---provided-examples-use-too-much-sram" /><item><title>RE: Bluetooth long range (coded PHY) on nrf52811 using nRF connect SDK - Provided examples use too much SRAM</title><link>https://devzone.nordicsemi.com/thread/356074?ContentTypeID=1</link><pubDate>Thu, 03 Mar 2022 13:50:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:96847470-7985-42cb-a08e-2f7b9970cb4f</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Felix,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can squeeze the RAM usage to fit inside the nRF52811 by removing log, debug information and reduce the size of the stacks. Please have a look at the prj_minimal.conf we have inside peripheral_lbs example.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Make sure you&amp;nbsp;don&amp;#39;t set CONFIG_BT_PHY_UPDATE=n .&lt;/p&gt;
&lt;p&gt;I attached the file that worked for me. After compilation it&amp;#39;s showed 16308 Bytes needed for RAM.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/0513.prj.conf"&gt;devzone.nordicsemi.com/.../0513.prj.conf&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The most important config that reduce most of the RAM are:&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;CONFIG_BT_DEBUG_NONE=y&lt;/p&gt;
&lt;p&gt;# Example output of thread analyzer&lt;br /&gt;# SDC RX : unused 816 usage 208 / 1024 (20 %)&lt;br /&gt;# BT RX : unused 1784 usage 416 / 2200 (18 %)&lt;br /&gt;# BT TX : unused 992 usage 544 / 1536 (35 %)&lt;br /&gt;# thread_analyzer : unused 136 usage 376 / 512 (73 %)&lt;br /&gt;# sysworkq : unused 1824 usage 224 / 2048 (10 %)&lt;br /&gt;# MPSL signal : unused 520 usage 504 / 1024 (49 %)&lt;br /&gt;# idle 00 : unused 192 usage 64 / 256 (25 %)&lt;br /&gt;# main : unused 136 usage 888 / 1024 (86 %)&lt;br /&gt;# Configurations set based on thread analyzer output.&lt;br /&gt;CONFIG_BT_CTLR_SDC_RX_STACK_SIZE=324&lt;br /&gt;CONFIG_BT_RX_STACK_SIZE=1024&lt;br /&gt;CONFIG_BT_HCI_TX_STACK_SIZE_WITH_PROMPT=y&lt;br /&gt;CONFIG_BT_HCI_TX_STACK_SIZE=640&lt;br /&gt;CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=256&lt;br /&gt;CONFIG_MPSL_SIGNAL_STACK_SIZE=640&lt;br /&gt;CONFIG_MAIN_STACK_SIZE=1024&lt;br /&gt;CONFIG_IDLE_STACK_SIZE=128&lt;br /&gt;CONFIG_ISR_STACK_SIZE=1024&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Note that you may need to run thread analyze for your own application. The number here are from the periphreal_lbs it may not the same for your application.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>