<?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>central stops receiving after sometime</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/25193/central-stops-receiving-after-sometime</link><description>Hi, 
 Central: nrf52840 
 peripheral: nrf52840 
 Connection interval (both min &amp;amp; max) = 10ms 
 ATT_MTU size: 52 bytes 
 Dle: 52+4 bytes 
 Connection event extension: enabled 
 Slave latency: 0 
 Connection supervision timeout: 4s 
 PHY: 1MBps</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 11 Oct 2017 13:44:49 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/25193/central-stops-receiving-after-sometime" /><item><title>RE: central stops receiving after sometime</title><link>https://devzone.nordicsemi.com/thread/99290?ContentTypeID=1</link><pubDate>Wed, 11 Oct 2017 13:44:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:02a162e3-9344-4686-98e4-959e03b7a048</guid><dc:creator>Nivetha</dc:creator><description>&lt;p&gt;@Martin I disabled the NRF_LOG_DEFFERED option. As you said, this was causing the &amp;quot;Overflow&amp;quot; message log.  By default, NRF_LOG_BACKEND_RTT_OUTPUT_BUFFER_SIZE is set to 512 bytes. Hence, I didn&amp;#39;t increase it further. I ran the test for more than 2 hours and have not seen any disconnection. I&amp;#39;m slightly puzzled! Did this call the app_error_fault_handler from the soft device fault handler? Is so, crashing the system because of log buffer overflow is not acceptable.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: central stops receiving after sometime</title><link>https://devzone.nordicsemi.com/thread/99289?ContentTypeID=1</link><pubDate>Wed, 11 Oct 2017 12:23:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a987bc85-8f6e-4b66-82a1-65bdc8028bc7</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;Happy to help. I&amp;#39;ll pass your idea over to the SDK team.&lt;/p&gt;
&lt;p&gt;Let me know how it goes.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: central stops receiving after sometime</title><link>https://devzone.nordicsemi.com/thread/99288?ContentTypeID=1</link><pubDate>Wed, 11 Oct 2017 12:21:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f2091d4b-108c-4e23-b739-fec8e1b508d3</guid><dc:creator>Nivetha</dc:creator><description>&lt;p&gt;AH! Okay. I wish I knew this before. This message has to be starred so that &amp;quot;overflow&amp;quot; message won&amp;#39;t be mistaken as stack overflow. Thanks a lot, @Martin.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: central stops receiving after sometime</title><link>https://devzone.nordicsemi.com/thread/99287?ContentTypeID=1</link><pubDate>Wed, 11 Oct 2017 12:16:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4d6196b0-70ee-430d-addd-be9dc35cb51c</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;Yes, please try that. It can also be worth playing with the NRF_LOG_DEFERRED option. If you enable it, messages are buffered and only printed when you call NRF_LOG_FLUSH(), typically when the system is idle. If you disable it, each message is printed when the logging line of code is actually hit. So hence, if you use deferred logging, and of some reason never print the messages in the buffers, you might get an overflow.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: central stops receiving after sometime</title><link>https://devzone.nordicsemi.com/thread/99294?ContentTypeID=1</link><pubDate>Wed, 11 Oct 2017 12:01:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3015d7a7-bba9-4022-894d-df7ba449eaae</guid><dc:creator>Nivetha</dc:creator><description>&lt;p&gt;OMG! this overflow message is due to log buffer being full! I was thinking that my stack is filled because of samples etc.. Should I increase this?NRF_LOG_BACKEND_RTT_OUTPUT_BUFFER_SIZE&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: central stops receiving after sometime</title><link>https://devzone.nordicsemi.com/thread/99293?ContentTypeID=1</link><pubDate>Wed, 11 Oct 2017 11:47:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ed6c4a6d-587c-4de8-87ef-535c2734ee6d</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;The &amp;quot;Overflow&amp;quot; message is printed when the log buffer is full. It could be interesting to see what potential messages we are missing out on due to full buffers. The solution is to increase NRF_LOG_BUFSIZE or trigger log processing more frequently.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: central stops receiving after sometime</title><link>https://devzone.nordicsemi.com/thread/99292?ContentTypeID=1</link><pubDate>Wed, 11 Oct 2017 10:45:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:27f7a148-5a33-4a07-8a1a-4abb46cda70d</guid><dc:creator>Nivetha</dc:creator><description>&lt;p&gt;No, I saw this message using JLink RTT viewer. When the disconnection occurs, as I said in my previous comments, i see the debugger is stuck at app_error_fault_handler(app_error_weak.c) which is invoked from the soft_device_fault_handler. Ths id is 4097, pc = 147256 or the address varies sometimes. The below message is logged at the peripheral device.
it goes to # SEGGER J-Link RTT Viewer V6.16g Terminal Log File&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;# Compiled: 16:41:19 on Jul 10 2017
# Logging started @ 02 Oct 2017 14:00:54
SDH:DEBUG:RAM start at 0x200021b0.
 0&amp;gt; APP:DEBUG:Softdevice enabled
 0&amp;gt; TIMER:INFO:Function: nrf_drv_timer_init, error code: NRF_SUCCESS.
 0&amp;gt; TIMER:INFO:Timer id: 3, capture value set: 24, channel: 0.
 0&amp;gt; TIMER:INFO:Timer id: 3, capture value set: 32, channel: 1.
 0&amp;gt; TIMER:INFO:Timer id: 3, capture value set: 37, channel: 2.
 0&amp;gt; TIMER:INFO:Timer id: 3, capture value set: 40, channel: 3.
 0&amp;gt; TIMER:INFO:Timer id: 3, capture value set: 40, channel: 3.
 0&amp;gt; TIMER:INFO:Function: nrf_drv_timer_init, error code: NRF_SUCCESS.
 0&amp;gt; Overflow
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Besides this information, I tried testing the peripheral device using the oscilloscope at the LEDs on which are enabled when the samples are available. To my surprise, I could see the signals in the oscilloscope but something is preventing it from being transmitted as notifications. Hence I&amp;#39;m adding more logs to the err_code = sd_ble_gatts_hvx(p_semg-&amp;gt;conn_handle, &amp;amp;hvx_params); to see if something returned other than NRF_SUCCESS.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: central stops receiving after sometime</title><link>https://devzone.nordicsemi.com/thread/99291?ContentTypeID=1</link><pubDate>Wed, 11 Oct 2017 10:33:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:708bdc27-711d-4c9e-8f11-5a0a18a48151</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;Can you take a screenshot of this Overflow message? Is this shown in your debug IDE? Do see a stack trace or anything?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: central stops receiving after sometime</title><link>https://devzone.nordicsemi.com/thread/99283?ContentTypeID=1</link><pubDate>Mon, 02 Oct 2017 12:07:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:309db89c-634d-4633-a6c1-001a2c3fcda6</guid><dc:creator>Nivetha</dc:creator><description>&lt;p&gt;@Martin: Thank you so much. I adjusted the RAM size at the central and peripheral because both sides were showing up warnings. However, the actual problem is not yet solved. As usual, disconnection occurred during transmission, I just got a message at the transmitter as &amp;quot;Overflow&amp;quot; but I&amp;#39;m not sure from where this message is fired. &amp;quot;Disconnected&amp;quot; at the central.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: central stops receiving after sometime</title><link>https://devzone.nordicsemi.com/thread/99275?ContentTypeID=1</link><pubDate>Mon, 02 Oct 2017 09:52:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ff9eadd2-9143-49ab-b1ca-2f48d0b77d1d</guid><dc:creator>Nivetha</dc:creator><description>&lt;p&gt;i logged at this step in ble_stack-init function. err_code = softdevice_enable(&amp;amp;ram_start);
NRF_LOG_INFO(&amp;quot;&lt;em&gt;&lt;strong&gt;&lt;strong&gt;&lt;strong&gt;&lt;strong&gt;&lt;strong&gt;&lt;strong&gt;&lt;strong&gt;&lt;em&gt;RAM_INFO&lt;/em&gt;&lt;/strong&gt;&lt;/strong&gt;&lt;/strong&gt;&lt;/strong&gt;&lt;/strong&gt;&lt;/strong&gt;&lt;/strong&gt;&lt;/em&gt;* %d %n&amp;quot;, ram_start);&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;if (err_code != NRF_SUCCESS)
   {
       NRF_LOG_ERROR(&amp;quot;Failed softdevice_enable: 0x%08x\r\n&amp;quot;, err_code);
   }
   else
   {
       NRF_LOG_DEBUG(&amp;quot;Softdevice enabled\r\n&amp;quot;);
   }

APP_ERROR_CHECK(err_code);
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: central stops receiving after sometime</title><link>https://devzone.nordicsemi.com/thread/99274?ContentTypeID=1</link><pubDate>Mon, 02 Oct 2017 09:51:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dec2165c-3d3d-45f9-bdb5-e5efb3b1300f</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;The three first line basically tell you where to start. Try to change the base address and size in the linker file to the suggested values.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: central stops receiving after sometime</title><link>https://devzone.nordicsemi.com/thread/99273?ContentTypeID=1</link><pubDate>Mon, 02 Oct 2017 09:44:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f371014e-263e-4d9f-a6be-5c39352554ce</guid><dc:creator>Nivetha</dc:creator><description>&lt;p&gt;Hi @Martin Please find the &lt;a href="https://www.dropbox.com/s/niox13rablwur0f/tx.png?dl=0"&gt;Peripheral RTT log&lt;/a&gt; when it stopped the transmission of data.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: central stops receiving after sometime</title><link>https://devzone.nordicsemi.com/thread/99272?ContentTypeID=1</link><pubDate>Fri, 29 Sep 2017 13:09:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:272d1d15-34dc-4694-b25e-149830d7f1b8</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;0x33064 is probably not the error code, but the initial value of the err_code variable. If you look in the documentation above the definition of the function in softdevice_handler.h you will see that softdevice_app_ram_start_get() can only return one of two codes: NRF_SUCCESS or NRF_ERROR_NOT_FOUND (0 or 5). You have to step &lt;em&gt;past&lt;/em&gt; the line of code for the variable to get  updated with the return code.&lt;/p&gt;
&lt;p&gt;Anyway, what SDK are you using? I&amp;#39;m suspecting 13.x? The value you are after is calculated in softdevice_enable(). Inside this function there is a call to sd_ble_enable(). In the function there are also plenty of NRF_LOG printouts and these should pop up on your serial terminal and give you the clues that Martin Tverdal is asking for.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: central stops receiving after sometime</title><link>https://devzone.nordicsemi.com/thread/99271?ContentTypeID=1</link><pubDate>Thu, 28 Sep 2017 14:49:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4f376b63-41fe-4291-9cc7-34290259f44a</guid><dc:creator>Nivetha</dc:creator><description>&lt;p&gt;At the ble_stack_init err_code = softdevice_app_ram_start_get(&amp;amp;ram_start); i see that the value on hovering is 0x33064 which i suppose is the error code.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: central stops receiving after sometime</title><link>https://devzone.nordicsemi.com/thread/99282?ContentTypeID=1</link><pubDate>Thu, 28 Sep 2017 14:42:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:16927e0d-3825-4fb5-9ec9-555f4994c14d</guid><dc:creator>Martin Tverdal</dc:creator><description>&lt;p&gt;Could you find out how much memory the SoftDevice has protected?  It returns it when you call sd_ble_enable(&amp;amp;app_ram_base). So what Im interested in is the value in app_ram_base after sd_ble_enable has returned.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: central stops receiving after sometime</title><link>https://devzone.nordicsemi.com/thread/99281?ContentTypeID=1</link><pubDate>Thu, 28 Sep 2017 14:28:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a9ddfebb-bcef-4fec-a837-c26ff59d2ca5</guid><dc:creator>Nivetha</dc:creator><description>&lt;p&gt;Im using eclipse. The second time i ran, the location changed and i found that pc = 147256 belongs to           __sd_nvic_irq_enable stack. whereas pc= 147308 belonged to sd_nvic_critical_region_enter&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: central stops receiving after sometime</title><link>https://devzone.nordicsemi.com/thread/99280?ContentTypeID=1</link><pubDate>Thu, 28 Sep 2017 14:25:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8658880e-a218-49f3-b54b-60816383501a</guid><dc:creator>Martin Tverdal</dc:creator><description>&lt;p&gt;What we think has happened is that your application has written to protected memory. And the nRF52 HW has generated an interrupt that the SoftDevice has forwarded to you with the app_error_fault_handler function. So, if you have a breakpoint set there, the offending instruction in your application should be able to be spotted by looking at the callstack. What are you using for debugging? Keil? GDB?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: central stops receiving after sometime</title><link>https://devzone.nordicsemi.com/thread/99279?ContentTypeID=1</link><pubDate>Thu, 28 Sep 2017 14:18:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dc974671-d0b3-43a8-8c15-17312295e3d1</guid><dc:creator>Nivetha</dc:creator><description>&lt;p&gt;@Martin Thanks for taking over. This is from my debugger console. Program received signal SIGTRAP, Trace/breakpoint trap.
0x00023260 in app_error_fault_handler (id=4097, pc=147256, info=0) at ./components/libraries/util/app_error_weak.c:54
54	    NRF_LOG_FINAL_FLUSH();&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: central stops receiving after sometime</title><link>https://devzone.nordicsemi.com/thread/99278?ContentTypeID=1</link><pubDate>Thu, 28 Sep 2017 13:56:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bd84e712-d9ce-4a15-a708-b17a32a6ccc6</guid><dc:creator>Martin Tverdal</dc:creator><description>&lt;p&gt;The other Martin left for the day. But, I discussed this with him. And it does seem to be the case that it has nothing to with that. And in fact that it is your application somehow writing to memory it shouldn&amp;#39;t. Maybe a stack-overflow. Or some other kind of memory bug. Writing outside of an array perhaps.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: central stops receiving after sometime</title><link>https://devzone.nordicsemi.com/thread/99277?ContentTypeID=1</link><pubDate>Thu, 28 Sep 2017 13:53:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d54040f8-f07b-4b9f-8b69-799076fa07d0</guid><dc:creator>Nivetha</dc:creator><description>&lt;p&gt;Oh! that&amp;#39;s weird. So it has nothing to do with mishandling of interrupts?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: central stops receiving after sometime</title><link>https://devzone.nordicsemi.com/thread/99276?ContentTypeID=1</link><pubDate>Thu, 28 Sep 2017 13:47:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d093d810-2871-4209-a6e2-5ae6a66a4783</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;Continued....&lt;/p&gt;
&lt;p&gt;What this means is that your application tries to access memory that is reserved by the Softdevice. The application code that is trying to do that is located at address 147308 (0x23F6C). Are you able to figure out what code that is? You can look in your .map file or use your debugger and &amp;quot;Show disassembly at&amp;quot; 0x23F6C.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: central stops receiving after sometime</title><link>https://devzone.nordicsemi.com/thread/99270?ContentTypeID=1</link><pubDate>Thu, 28 Sep 2017 13:46:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eadd28c1-c564-499f-aa4a-61e77ddface0</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;Since this gets sent to you via softdevice_fault_handler() ID 4097 actually points to NRF_FAULT_ID_APP_MEMACC in nrf_sdm.h:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#define NRF_FAULT_ID_APP_MEMACC   (NRF_FAULT_ID_APP_RANGE_START + 1)          /**&amp;lt; Application invalid memory access. The info parameter will contain 0x00000000,
                                                                                   in case of SoftDevice RAM access violation. In case of SoftDevice peripheral
                                                                                   register violation the info parameter will contain the sub-region number of
                                                                                   PREGION[0], on whose address range the disallowed write access caused the
                                                                                   memory access fault. */
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: central stops receiving after sometime</title><link>https://devzone.nordicsemi.com/thread/99269?ContentTypeID=1</link><pubDate>Thu, 28 Sep 2017 12:00:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e4a965c6-55e7-46d5-90a2-b4aa6829c9c7</guid><dc:creator>Nivetha</dc:creator><description>&lt;p&gt;From the other issues on devzone, i found that Im misusing the interrupts and does 4097 refer to ///&amp;lt; Incorrect interrupt configuration (can be caused by using illegal priority levels, or having enabled SoftDevice interrupts)./// (refered from nrf_error_sdm.h)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: central stops receiving after sometime</title><link>https://devzone.nordicsemi.com/thread/99268?ContentTypeID=1</link><pubDate>Thu, 28 Sep 2017 11:44:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0caee990-69ea-4b9b-8c29-6ce3bf55dac7</guid><dc:creator>Nivetha</dc:creator><description>&lt;p&gt;Thanks, @Martin. I&amp;#39;m using 5.0.0-2.alpha&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: central stops receiving after sometime</title><link>https://devzone.nordicsemi.com/thread/99267?ContentTypeID=1</link><pubDate>Thu, 28 Sep 2017 11:40:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:692e25cb-16fd-4f0c-b3d8-02518d2c55ba</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;What S140 version are you using?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>