<?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>How i can get the Softdevice memory map?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/87315/how-i-can-get-the-softdevice-memory-map</link><description>Hi all, 
 
 Please refer below my development info. 
 softdevice : s132 nrf52_6.1.1 
 SDK : nRF5_SDK15.3.0 
 Board : customized board(Using internal clock, NRF52832) 
 
 I added external nor flash(8Mbits) to my board. 
 External flash can store some data</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 10 May 2022 07:42:51 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/87315/how-i-can-get-the-softdevice-memory-map" /><item><title>RE: How i can get the Softdevice memory map?</title><link>https://devzone.nordicsemi.com/thread/367075?ContentTypeID=1</link><pubDate>Tue, 10 May 2022 07:42:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7b5f95a6-d0fc-4e98-8348-9ba7bcb010b1</guid><dc:creator>Sigurd</dc:creator><description>[quote user="YM_beginner"]i try to change&amp;nbsp;NRF_SDH_BLE_GAP_EVENT_LENGTH&amp;nbsp;to 300 you mentioned, but the board can&amp;#39;t start.[/quote]
&lt;p&gt;After updating this, you likely need to allocate more RAM to the SoftDevice. See this post:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/guides/short-range-guides/b/getting-started/posts/adjustment-of-ram-and-flash-memory"&gt;https://devzone.nordicsemi.com/guides/short-range-guides/b/getting-started/posts/adjustment-of-ram-and-flash-memory&lt;/a&gt;&lt;/p&gt;
[quote user="YM_beginner"]but after NVIC_SystemReset, the system is off.I don&amp;#39;t know why.[/quote]
&lt;p&gt;You can try&amp;nbsp;sd_nvic_SystemReset() instead, and see if that have any affect. When the system restarts, it should start advertising again.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How i can get the Softdevice memory map?</title><link>https://devzone.nordicsemi.com/thread/367052?ContentTypeID=1</link><pubDate>Tue, 10 May 2022 04:19:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:73fb75c9-2dd0-463b-bb4c-f69625e12159</guid><dc:creator>YoungMin</dc:creator><description>&lt;p&gt;1) my code almost be like example code.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;void sapp_nus_send(void) // BLE &amp;lt;-&amp;gt; Phone
{
	uint32_t err_code = NRF_SUCCESS;
//	NRF_LOG_INFO(&amp;quot; sapp_nus_send&amp;quot;);
	uint16_t len = 0;
	uint8_t	send_msg_ready[BLE_NUS_MAX_DATA_LEN] = {0,};
	uint8_t i;
	nus_send_cnt = 0;
	len = queue_get_count(&amp;amp;queue_ble_to_phone);
	if(len) //
	{
		if(!Aging_para)
		{
			if(len &amp;gt; sizeof(send_msg_ready)) len = sizeof(send_msg_ready);
//			NRF_LOG_INFO(&amp;quot;Nus_len : %d&amp;quot;,len);
			for(i = 0; i &amp;lt; len; i++)
			{
					queue_pull(&amp;amp;queue_ble_to_phone, &amp;amp;send_msg_ready[i]);
			}
			do
					{
							uint16_t length = (uint16_t)len;
							err_code = ble_nus_data_send(p_nus, send_msg_ready, &amp;amp;length, m_conn_handle);
							nus_send_cnt++;
							if(nus_send_cnt &amp;gt; 0xFFF0)
								NVIC_SystemReset();
							if ((err_code != NRF_ERROR_INVALID_STATE) &amp;amp;&amp;amp; (err_code != NRF_ERROR_RESOURCES) &amp;amp;&amp;amp; (err_code != NRF_ERROR_NOT_FOUND))
							{
									APP_ERROR_CHECK(err_code);
							} 
					} 
					while (err_code == NRF_ERROR_RESOURCES);
			}
			else if(Aging_para)
			{
					play_read();
					sapp_ble_flush();
					sapp_phone_flush();
					sapp_uart_flush();
			}
	}
	APP_ERROR_CHECK(err_code);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;2) my settings are&amp;nbsp;&lt;span&gt;NRF_SDH_BLE_GAP_EVENT_LENGTH&amp;nbsp;= 6 and&amp;nbsp;NRF_SDH_BLE_GAP_DATA_LENGTH&amp;nbsp; = 251.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;i try to change&amp;nbsp;NRF_SDH_BLE_GAP_EVENT_LENGTH&amp;nbsp;to 300 you mentioned, but the board can&amp;#39;t start.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I added a nus timer. NVIC_SystemReset runs when the nus timer exceeds the limit.&lt;/p&gt;
&lt;p&gt;but after NVIC_SystemReset, the system is off.I don&amp;#39;t know why.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;thanks for your help.&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How i can get the Softdevice memory map?</title><link>https://devzone.nordicsemi.com/thread/365352?ContentTypeID=1</link><pubDate>Thu, 28 Apr 2022 09:23:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9d0a707b-b725-4b16-8366-818079446bfe</guid><dc:creator>Sigurd</dc:creator><description>[quote user="YM_beginner"]So, Could I think that this problem is caused by notification being disabled&amp;nbsp;during&amp;nbsp;sending data?[/quote]
&lt;p&gt;I&amp;#39;m not seeing the&amp;nbsp;central&amp;nbsp;disabling it, so from the peripheral side of things, it shouldn&amp;#39;t be an issue to continue sending notifications. The&amp;nbsp;&lt;span&gt;NRF_ERROR_RESOURCES code means that the internal&amp;nbsp;notification buffer in the SoftDevice is full, and you need to wait before you can queue&amp;nbsp;more packets.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;1) How does your function that calls&amp;nbsp;&lt;span&gt;ble_nus_data_send() looks like? how do you handle the&amp;nbsp;NRF_ERROR_RESOURCES code?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;2) What is&amp;nbsp;NRF_SDH_BLE_GAP_EVENT_LENGTH and&amp;nbsp;NRF_SDH_BLE_GAP_DATA_LENGTH set to in sdk_config.h ?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Try setting&amp;nbsp;NRF_SDH_BLE_GAP_EVENT_LENGTH to 300 and&amp;nbsp;NRF_SDH_BLE_GAP_DATA_LENGTH to 251&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How i can get the Softdevice memory map?</title><link>https://devzone.nordicsemi.com/thread/365280?ContentTypeID=1</link><pubDate>Thu, 28 Apr 2022 02:42:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e0ba3c58-3cbf-46ee-883c-14d855ef8543</guid><dc:creator>YoungMin</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The error-code is NRF_ERROR_RESOURCES(0x00000013).&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;So, Could I think that this problem is caused by notification being disabled&amp;nbsp;during&amp;nbsp;sending data?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How i can get the Softdevice memory map?</title><link>https://devzone.nordicsemi.com/thread/365163?ContentTypeID=1</link><pubDate>Wed, 27 Apr 2022 11:29:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:13f73ed5-b528-4297-ae03-69da62e3dbe0</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;From the log, it seems like the nRF52 stopped sending notifications. The BLE link was still alive after that, but then shortly after the master/central device disconnected the link.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
[quote user="YM_beginner"]Data remains in the nus queue. I think that&amp;#39;s why BLE is busy.[/quote]
&lt;p&gt;Are you usign&amp;nbsp;ble_nus_data_send() to send data? Did it return any error-codes?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How i can get the Softdevice memory map?</title><link>https://devzone.nordicsemi.com/thread/365062?ContentTypeID=1</link><pubDate>Wed, 27 Apr 2022 01:22:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e297a886-8f5a-4ec3-8412-a4f4cdb7eb07</guid><dc:creator>YoungMin</dc:creator><description>&lt;p&gt;Hi Sigurd,&lt;/p&gt;
&lt;p&gt;1) Yes. this is a log file when it happens.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/MBN52832_5F00_LOG.pcapng"&gt;devzone.nordicsemi.com/.../MBN52832_5F00_LOG.pcapng&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;2) In this situation, p_ble_evt-&amp;gt;header.evt_id is&amp;nbsp;BLE_GAP_EVT_CONNECTED.&lt;/p&gt;
&lt;p&gt;Data remains in the nus queue. I think that&amp;#39;s why BLE is busy.&lt;/p&gt;
&lt;p&gt;The main loop don&amp;#39;t run. So, i can&amp;#39;t check it.&lt;/p&gt;
&lt;p&gt;above picture in my qeustion, the assembly show it run softdevice area.&lt;/p&gt;
&lt;p&gt;How i can check the softdevice?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;3) The nRF Connect app doesn&amp;#39;t stop. However I can&amp;#39;t connect to my board.&lt;/p&gt;
&lt;p&gt;The BLE freezes. So, I should detach battery if i want to restart.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How i can get the Softdevice memory map?</title><link>https://devzone.nordicsemi.com/thread/364919?ContentTypeID=1</link><pubDate>Tue, 26 Apr 2022 11:04:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:18f9b7d2-a5fa-4dc8-88d3-ee3113ee7a60</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote userid="84634" url="~/f/nordic-q-a/87315/how-i-can-get-the-softdevice-memory-map"]if the connection is lost when i am reading data from the external storage flash, the BLE stops.[/quote]
&lt;p&gt;1) Could you upload a nRF sniffer trace for when this happens?&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.nordicsemi.com/Products/Development-tools/nRF-Sniffer-for-Bluetooth-LE"&gt;https://www.nordicsemi.com/Products/Development-tools/nRF-Sniffer-for-Bluetooth-LE&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;2) Could you check the disconnect reason?&lt;/p&gt;
&lt;p&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v6.1.1/structble__gap__evt__disconnected__t.html"&gt;https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v6.1.1/structble__gap__evt__disconnected__t.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;3) The app just freezes? Are you getting any asserts or error-codes returned from any functions?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>