<?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>Connection failure when sending and receiving data simultaneously with SoftDevice 6.0 and SDK 15</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/36238/connection-failure-when-sending-and-receiving-data-simultaneously-with-softdevice-6-0-and-sdk-15</link><description>I’m experiencing random connection failure when transferring data (both ways at the same time) between my peripheral ( Slave ) and central ( Master ) device. The problem appeared just after upgrade to the SoftDevice 132 ( version 6.0 ) and SDK ( version</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 03 Sep 2018 18:51:23 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/36238/connection-failure-when-sending-and-receiving-data-simultaneously-with-softdevice-6-0-and-sdk-15" /><item><title>RE: Connection failure when sending and receiving data simultaneously with SoftDevice 6.0 and SDK 15</title><link>https://devzone.nordicsemi.com/thread/147052?ContentTypeID=1</link><pubDate>Mon, 03 Sep 2018 18:51:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:09be57c0-83cb-420a-bc12-4baa02f46315</guid><dc:creator>JRRSoftware</dc:creator><description>&lt;p&gt;I think the subject shoudn&amp;#39;t be closed yet. I&amp;#39;m happy that Bruce found the solution for his problem but&amp;nbsp;mine still isn&amp;#39;t solved yet. &lt;br /&gt;Did you checked&amp;nbsp;the sample code I provided some time ago that replicates the issue?&lt;/p&gt;
&lt;p&gt;If not, here is the link:&lt;br /&gt;&lt;a href="https://drive.google.com/file/d/1cXsduRdlnS_2xqVA3PXpB3KtY_KcU9nZ/view?usp=sharing"&gt;https://drive.google.com/file/d/1cXsduRdlnS_2xqVA3PXpB3KtY_KcU9nZ/view?usp=sharing&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It clearly shows that assertion isn&amp;#39;t thrown when it should.&lt;/p&gt;
&lt;p&gt;Jack&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection failure when sending and receiving data simultaneously with SoftDevice 6.0 and SDK 15</title><link>https://devzone.nordicsemi.com/thread/147037?ContentTypeID=1</link><pubDate>Mon, 03 Sep 2018 16:24:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b551dea4-04c8-433a-93a4-ae0ba4e2cf30</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Thanks for letting us know Bruce&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection failure when sending and receiving data simultaneously with SoftDevice 6.0 and SDK 15</title><link>https://devzone.nordicsemi.com/thread/146598?ContentTypeID=1</link><pubDate>Thu, 30 Aug 2018 23:49:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b4de38b0-2420-4799-901c-91ab0495d3e2</guid><dc:creator>owl-wy7n</dc:creator><description>&lt;p&gt;Here is an update on our end.&lt;/p&gt;
&lt;p&gt;Ends up we didn&amp;#39;t need to reimplement our ISR.&amp;nbsp; Our mobile app developer found a bug in his code that explained our remaining symptoms.&lt;/p&gt;
&lt;p&gt;I guess it&amp;#39;s OK for an ISR to run for 50 uS or so.&lt;/p&gt;
&lt;p&gt;Thanks for the help!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection failure when sending and receiving data simultaneously with SoftDevice 6.0 and SDK 15</title><link>https://devzone.nordicsemi.com/thread/146192?ContentTypeID=1</link><pubDate>Wed, 29 Aug 2018 00:46:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:293431d4-f9dc-4572-b653-9201fe877592</guid><dc:creator>owl-wy7n</dc:creator><description>&lt;p&gt;Hello Aryan,&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve been away on a very welcome vacation.&amp;nbsp; I&amp;#39;m now back to work on this issue.&lt;/p&gt;
&lt;p&gt;Our ISR is running at priority 6.&lt;/p&gt;
&lt;p&gt;This is lower than all the softdevice interrupts.&amp;nbsp; But, by definition, it is higher priority than the ble task.&amp;nbsp; It preempts the ble task, thus causing the same symptoms as described by JRRSoftware.&amp;nbsp; In his case it was a FreeRTOS task that was preempting the ble task. In our case it is this ISR.&lt;/p&gt;
&lt;p&gt;Our plan is to reimplement our ISR to do its time consuming work in a task that is lower priority than the ble task.&amp;nbsp; All the ISR will do is wake the bottom-half ISR task.&amp;nbsp; I predict that this will fix the problem.&amp;nbsp; I&amp;#39;ll let you know what I find.&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;
&lt;p&gt;Bruce&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection failure when sending and receiving data simultaneously with SoftDevice 6.0 and SDK 15</title><link>https://devzone.nordicsemi.com/thread/144893?ContentTypeID=1</link><pubDate>Mon, 20 Aug 2018 09:56:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d87d4c19-0cf0-44de-9066-f5e55a6544eb</guid><dc:creator>JRRSoftware</dc:creator><description>&lt;p&gt;Do we have any update?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection failure when sending and receiving data simultaneously with SoftDevice 6.0 and SDK 15</title><link>https://devzone.nordicsemi.com/thread/143910?ContentTypeID=1</link><pubDate>Mon, 13 Aug 2018 11:14:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d60a4206-a2e3-42d2-a152-86114552291c</guid><dc:creator>JRRSoftware</dc:creator><description>&lt;p&gt;Yes, you can reproduce the issue using my test program. The IRQ&amp;nbsp;priority for hardware timer is set to 6.&lt;br /&gt;Try to run my test program without any modifications. All &amp;quot;definse&amp;#39;s&amp;quot; are set to values that cause the issue on my dev boards. The settings are as follows:&lt;/p&gt;
&lt;p&gt;#define ISR_WORKLOAD_MODE 2 // simulate workload on DUMMY side&lt;br /&gt;#define ISR_IRQ_PRIORITY 6 //IRQ priority for harware timer used to trigger the workload&amp;nbsp;ISR&lt;br /&gt;#define ISR_WORKLOAD_EVERY 10 //trigger&amp;nbsp;workload ISR every 10 ms&lt;br /&gt;#define WORKLOAD_TIMER_LOOP_COUNT&amp;nbsp;10000 // workload is a loop counting to 10 000&lt;/p&gt;
&lt;p&gt;Alternatively, you can keep pressing (very fast) first button (index 0) to simulate the workload on both sides (tester/dummy) and if you are lycky enough, you will reproduce the issue&amp;nbsp;that way too.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;ps: I&amp;#39;m aware that IRQa 0,1,4 can NOT be used. It was rather my hint for Bruce, and confirmation that they really cannot be used &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Jack&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection failure when sending and receiving data simultaneously with SoftDevice 6.0 and SDK 15</title><link>https://devzone.nordicsemi.com/thread/143905?ContentTypeID=1</link><pubDate>Mon, 13 Aug 2018 10:24:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d8c6fcfa-306e-41ab-a7e8-9e9e1e9178af</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Hi JRRSoftware,&lt;/p&gt;
&lt;p&gt;good experiment, but you cannot use priorities number 0, 1 and 4 in your test as those will guarantee undefined behavior.&lt;/p&gt;
&lt;p&gt;In any case, I think it is always wise to keep ISR as short as possible.&amp;nbsp; Were you be able to reproduce the issue without using priorities 0,1 and 4?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection failure when sending and receiving data simultaneously with SoftDevice 6.0 and SDK 15</title><link>https://devzone.nordicsemi.com/thread/143903?ContentTypeID=1</link><pubDate>Mon, 13 Aug 2018 10:16:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2cdcc7bd-a8ac-4ba7-9693-c1054aaed09c</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Hello Bruce,&lt;/p&gt;
&lt;p&gt;The softdevice will always run on highest priority for most time critical tasks and the application will never use this priority&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The app can use next higher priority (priority 2 and 3) as you can see in the the pic below.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-deca63e03de24b2e8d5188f4f7a68906/pastedimage1534155403352v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;If your app ISR is using these higher priority rather than (priority 5, 6 and 7), then you are blocking non critical softdevice activities. This is legal as long as your connection is not depending on your app replying to the peer&amp;#39;s query. And this can be only notified by softdevice to the app using the SWI2 interrupt using Priority 4. If your app is using priority 2 and 3, long enough to block this notification from softdevice, the peer can in some circumstances deem to understand that the connection is either lost or will intentionally terminate the connection as no response.&lt;/p&gt;
&lt;p&gt;It is hard to define &amp;quot;too long&amp;quot; in this. I think that it depends on if there are any procedures that can happen requiring you app to respond within certain time. Encryption could be one example.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection failure when sending and receiving data simultaneously with SoftDevice 6.0 and SDK 15</title><link>https://devzone.nordicsemi.com/thread/143816?ContentTypeID=1</link><pubDate>Sun, 12 Aug 2018 15:01:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2b8539a9-005b-4495-b34b-84e714d820fd</guid><dc:creator>JRRSoftware</dc:creator><description>&lt;p&gt;&lt;span style="font-weight:400;"&gt;Dear Aryan and Bruce,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;After many hours of investigations I think I managed to solve this problem.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;I say &amp;ldquo;I think&amp;rdquo; because I need to carry on further tests to be 100% sure. But so far my program works.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;The most important finding and observation is:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;In some very specific circumstances, the sd_ble_gattc_write() function does NOT throw assertion when it should do. There are situations where assertion seems to be hidden or some how is not propagated properly, which leads to the &amp;ldquo;connection failure&amp;rdquo; described in this topic.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;I&amp;rsquo;ve prepared a sample test program, where you can simulate different scenarios for the above.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;It is actually the 3rd version and the link is available here:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://drive.google.com/file/d/1cXsduRdlnS_2xqVA3PXpB3KtY_KcU9nZ/view?usp=sharing"&gt;&lt;span style="font-weight:400;"&gt;https://drive.google.com/file/d/1cXsduRdlnS_2xqVA3PXpB3KtY_KcU9nZ/view?usp=sharing&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;I found several cases where the &amp;ldquo;connection issue&amp;rdquo; might popup:&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Task priorities&lt;/span&gt;&lt;span style="font-weight:400;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight:400;"&gt;Yes, Aryan was right in one of his previous replies. It is important to set task priorities right in the RTOS environment or use the &amp;ldquo;configUSE_TIME_SLICING&amp;rdquo; option.&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;High priority ISR&lt;/span&gt;&lt;span style="font-weight:400;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight:400;"&gt;BLE stack seems to be very sensitive for a heavy workload inside an ISR function with a high priority. It is very easy to reproduce the problem with hardware timer of which the IRQ priority is set to 0 (highest) and the workload is &amp;ldquo;just&amp;rdquo; a loop counting to 400 only! &lt;/span&gt;&lt;span style="font-weight:400;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight:400;"&gt;Like this: &lt;/span&gt;&lt;span style="font-weight:400;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight:400;"&gt;for (int i=0;i&amp;lt;400;i++) {};&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Low priority ISR&lt;/span&gt;&lt;span style="font-weight:400;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight:400;"&gt;It is still possible to reproduce the problem with low priority ISR. In my case, the workload loop must count to 10000 (for (int i=0;i&amp;lt;10000;i++) {};) &lt;/span&gt;&lt;span style="font-weight:400;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight:400;"&gt;and you probably need to wait a bit (while running my test program) until the problem occurs.&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Volatile variables&lt;/span&gt;&lt;span style="font-weight:400;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight:400;"&gt;Probably my most important finding that helped me to solve the issue. &lt;/span&gt;&lt;span style="font-weight:400;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight:400;"&gt;I found an object (a buffer with control properties) that has been shared among 2 RTOS tasks and was NOT declared as &amp;ldquo;volatile&amp;rdquo;. I still do not fully understand why it has such a big impact to the BLE stack (and the sd_ble_gattc_write function) causing the &amp;ldquo;connection failure&amp;rdquo; to popup very occasionally and so hard to catch.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;I think there are few questions that still need to be answered. For example, why assertion is not throwed by the sd_ble_gattc_write() when it should be?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Hopefully, my test program can help to answer them.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;In the &amp;ldquo;main.c&amp;rdquo; file you will find the following defines that controls the program:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;#define ISR_WORKLOAD_MODE&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;0 - no workload called from ISR (timer) function&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;1 - workload called on TESTER side&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;2 - workload called on DUMMY (other) side&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;3 - workload called on both sides&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;#define ISR_IRQ_PRIORITY&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;0-7 are the ISR (hardware timer) priorities. Use 0 for high and 7 for low priority. If set to 0, the WORKLOAD_TIMER_LOOP_COUNT can be set to 400, which is enough to reproduce the issue.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;#define ISR_WORKLOAD_EVERY&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;This is time in ms that tells how often the ISR workload need to be run.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;#define WORKLOAD_BUTTON_LOOP_COUNT&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Workload &amp;ldquo;heaviness&amp;rdquo; when called from button event.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;#define WORKLOAD_TIMER_LOOP_COUNT&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Workload &amp;ldquo;heaviness&amp;rdquo; when called from hardware timer.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;By the way, you can replicate the problem by pressing the first button fast enough (on the PCA 10040 dev boards).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;As mentioned before, the test program is based on the &amp;ldquo;ble_app_att_mtu_throughput&amp;rdquo; sample code from the SDK.&lt;/span&gt;&lt;span style="font-weight:400;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection failure when sending and receiving data simultaneously with SoftDevice 6.0 and SDK 15</title><link>https://devzone.nordicsemi.com/thread/143777?ContentTypeID=1</link><pubDate>Sat, 11 Aug 2018 00:47:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ef1c65c5-6839-4060-8a5f-8a3c00143023</guid><dc:creator>owl-wy7n</dc:creator><description>&lt;p&gt;Hello Aryan,&lt;/p&gt;
&lt;p&gt;We are experiencing a very similar problem.&lt;/p&gt;
&lt;p&gt;In our case our task priorities are correct (the softdevice task is the highest priority).&amp;nbsp; Our failure is caused by an ISR that is starving the softdevice task.&amp;nbsp; That ISR is consuming more than 50% of available CPU cycles.&lt;/p&gt;
&lt;p&gt;We are in process of refactoring the design to correct this.&amp;nbsp; In doing so, questions have come up that we hope you can answer.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll explain...&lt;/p&gt;
&lt;p&gt;We have one prototype ISR implementation that consumes very close to 0% of available CPU cycles.&amp;nbsp; That version seems to resolve the problem described in this forum.&amp;nbsp; Alas, this version is not optimal for our application.&amp;nbsp; We need to do more work in the ISR.&lt;/p&gt;
&lt;p&gt;We have made another prototype ISR implementation that is better for our application.&amp;nbsp; That version consumes about 5% of the CPU. Alas, it appears that the connection problem is back with this version.&lt;/p&gt;
&lt;p&gt;So here are the questions...&lt;/p&gt;
&lt;p&gt;Is the problem caused by the % of CPU stolen from the softdevice task?&amp;nbsp; Or is it the duration?&amp;nbsp; E.g. our ISR implementation that consumes %50 of the CPU only keeps the CPU for about 5 uS, but does so every 10 uS. The implementation that consumes %5 of the CPU keeps the CPU for about 50 uS and does so once every 1 mS or so.&lt;/p&gt;
&lt;p&gt;My guess is that both are bad.&amp;nbsp; We will refactor once again and put most of the 50 uS processing in a task that is lower priority than the softdevice task.&amp;nbsp; My guess is this will fix things.&lt;/p&gt;
&lt;p&gt;The question though, is how long is &amp;quot;too long&amp;quot; for a user ISR to preempt the softdevice task?&amp;nbsp; It appears that 50 uS is too long.&lt;/p&gt;
&lt;p&gt;Comments?&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;
&lt;p&gt;Bruce&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection failure when sending and receiving data simultaneously with SoftDevice 6.0 and SDK 15</title><link>https://devzone.nordicsemi.com/thread/142124?ContentTypeID=1</link><pubDate>Tue, 31 Jul 2018 10:01:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2aab7201-86a6-4867-9d44-1fc44b87d1ef</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Hi, Very good question, but is not very straight forward to answer&lt;/p&gt;
&lt;p&gt;If you understand your system very well, then you should be able to tell the timing constraints of each action to be performed by your application. Very strict timing requirement on tasks gives them high priority compared to the others.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In your application where you seem to send the audio data, your application gives high importance on being able to transmit data (by notifications). So the task that sends hvx data could be high in priority. At the same time you should see that the high priority tasks suspends once in a while to give low priority tasks chance to run (else low priority task will never run in FreeRTOS). Safest way if you do not have clear understanding of inter dependency of tasks in your system is to enable time slicing and use same priority on tasks.&lt;/p&gt;
&lt;p&gt;I also did not see it very efficient that the fact that you used timer to send a notification (and only one notification at a time) instead of TX_COMPLETE event (and sending as much as you can in that event). But maybe you did this just an example to demonstrate the problem and your real application does it differently.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection failure when sending and receiving data simultaneously with SoftDevice 6.0 and SDK 15</title><link>https://devzone.nordicsemi.com/thread/142120?ContentTypeID=1</link><pubDate>Tue, 31 Jul 2018 09:37:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6041d9be-f626-4af0-9b7e-2d2356281c81</guid><dc:creator>JRRSoftware</dc:creator><description>&lt;p&gt;Hi Aryan&lt;/p&gt;
&lt;p&gt;I think we are very close to the final solution for this problem.&lt;br /&gt;Your suggestions helped&amp;nbsp;a lot and I managed to run the application whithout the issue described.&lt;/p&gt;
&lt;p&gt;However, what is your suggestion about task priorities in this case?&lt;br /&gt;It wasn&amp;#39;t my intention to run all tasks at the same priority level.&lt;br /&gt;I would rather assign different priority level&amp;nbsp;for each task than use the &amp;quot;time slicing&amp;quot; option (&lt;span&gt;configUSE_TIME_SLICING) on.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Do you think&amp;nbsp;this approach is right?&amp;nbsp;&lt;br /&gt;Would it be a good practice, if SDH task has&amp;nbsp;the highest priority&amp;nbsp;in the entire application? (in the SDK code, the nrf_sdh_freertos_init() function&amp;nbsp;sets the SDH task priority to 2 ...which is fairy low).&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Or maybe you will advise the same priorities&amp;nbsp;for&amp;nbsp;all tasks and use &amp;quot;time slicing&amp;quot; option on?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection failure when sending and receiving data simultaneously with SoftDevice 6.0 and SDK 15</title><link>https://devzone.nordicsemi.com/thread/142057?ContentTypeID=1</link><pubDate>Tue, 31 Jul 2018 07:31:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b87d2272-fa21-4d55-91fb-4a30a8d72740</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;setting the timeslicing to 1 has fixed the problem in the project you attached.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection failure when sending and receiving data simultaneously with SoftDevice 6.0 and SDK 15</title><link>https://devzone.nordicsemi.com/thread/142055?ContentTypeID=1</link><pubDate>Tue, 31 Jul 2018 07:30:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:07f04e94-4bb8-4dd2-8fae-6dc8ebac18b4</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Hi JRRSoftware,&lt;/p&gt;
&lt;p&gt;I was able to run some tests and i found it very clear that your timer deamon task at priority (2) was starving your dummy task and softdevice task at the same priority.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#define configTIMER_TASK_PRIORITY ( 2 )&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Remember that in FreeRTOS configuring the kernel is very important to suit your needs. Since you have many &amp;quot;runnable&amp;quot; state tasks at the same time with same priority, FreeRTOS scheduler will always choose one task to run and starve the rest as long as the first task suspends itself. The reason is that you have set the timeslicing of equal priority tasks to 0. Your configuration for this is as below&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#define configUSE_TIME_SLICING 0&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Quoting the text from FreeRTOS documentation&lt;/p&gt;
&lt;h3&gt;&lt;em&gt;&lt;a name="configUSE_TIME_SLICING"&gt;&lt;/a&gt;configUSE_TIME_SLICING&lt;/em&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;By default (if configUSE_TIME_SLICING is not defined, or if configUSE_TIME_SLICING is defined as 1) FreeRTOS uses prioritised preemptive scheduling with time slicing. That means the RTOS scheduler will always run the highest priority task that is in the Ready state, and will switch between tasks of equal priority on every RTOS tick interrupt. If configUSE_TIME_SLICING is set to 0 then the RTOS scheduler will still run the highest priority task that is in the Ready state, but will not switch between tasks of equal priority just because a tick interrupt has occurred.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;So if you set the timeslicing to 1 and leave the preemption to 1, then you should not see this problem.&lt;/p&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;configUSE_PREEMPTION&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;1&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p&gt;configUSE_TIME_SLICING&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;1&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;I guess some timing has changed with softdevice in few microseconds with relation to the notification for us to be able to trigger this corner case. Never the less, please choose your task priorities very wisely, they are very crucial part of your application design.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection failure when sending and receiving data simultaneously with SoftDevice 6.0 and SDK 15</title><link>https://devzone.nordicsemi.com/thread/142053?ContentTypeID=1</link><pubDate>Tue, 31 Jul 2018 07:25:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1f37248a-51e4-45cf-8dfe-62805beee080</guid><dc:creator>JRRSoftware</dc:creator><description>&lt;p&gt;&lt;span style="font-weight:400;"&gt;Hi Aryan,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Thanks for your reply.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Answering your questions in short:&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;In my code, as well as in the provided example, changing tasks priorities does not make any difference. As far as I understand how RTOS works, in my configuration the task priorities are used only to queue tasks in the right order. &amp;nbsp;Please note that the &amp;ldquo;configUSE_TIME_SLICING&amp;rdquo; is set to 0.&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;The problem popped out once we upgraded SoftDevice and SDK to the latest versions&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;I&amp;rsquo;m not sure if the interrupt model for SDH can be mixed with RTOS tasks. I&amp;rsquo;m worried about unexpected behaviour.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;I&amp;rsquo;m looking forward to your&amp;nbsp;further investigations.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection failure when sending and receiving data simultaneously with SoftDevice 6.0 and SDK 15</title><link>https://devzone.nordicsemi.com/thread/142012?ContentTypeID=1</link><pubDate>Mon, 30 Jul 2018 20:04:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3eda88ec-03a0-4e60-8425-9e2023ae770d</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thanks Hung for trying to look into this case.&lt;/p&gt;
&lt;p&gt;Sorry JRRSoftware for the delays. I have read all your investigation and thank you for doing a very detail analysis.&lt;/p&gt;
&lt;p&gt;I can see that you narrowed down the problem to the configuration of&amp;nbsp;NRF_SDH_DISPATCH_MODEL.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Hung has given a very good answer on why are getting&amp;nbsp;NORESOURCE&amp;nbsp; error. I want to get few answers from my investigation tomorrow&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The design of your task priorities compared with softdevice task.&lt;/li&gt;
&lt;li&gt;What has changed between the software versions for this behavior to pop out. If everything else remained same, then this error should have appeared in old SD and SDK version, i need to understand exactly what changed.&lt;/li&gt;
&lt;li&gt;I will look into your example tomorrow and see if the interrupt model for SDH suits your needs or not.&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;We really appreciate your patience , you definitely are debugging into right direction and gave me some good start.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection failure when sending and receiving data simultaneously with SoftDevice 6.0 and SDK 15</title><link>https://devzone.nordicsemi.com/thread/140911?ContentTypeID=1</link><pubDate>Mon, 23 Jul 2018 06:34:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4d2c97f1-1e53-42f7-b764-b5902139f50b</guid><dc:creator>JRRSoftware</dc:creator><description>&lt;p&gt;Thanks. I look forward for further updates.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection failure when sending and receiving data simultaneously with SoftDevice 6.0 and SDK 15</title><link>https://devzone.nordicsemi.com/thread/140860?ContentTypeID=1</link><pubDate>Fri, 20 Jul 2018 14:51:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6671c396-bc6a-4dbd-adbd-b796b0e577f4</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Sorry for late update, due to the summer holiday, most of our expert in FreeRTOS are on vacation so the progress of the case is quite slow.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I captured a sniffer trace and seems that when the issue happens the Master can&amp;#39;t ACK the write command from the Slave and keep NACKing. This results in the NORESOURCE issue. I assume in your code you sent (the last one) you send data both way ? It&amp;#39;s not very clear on the trace dues to the sniffer issue.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This then comes to what you mentioned, how the application pulls events out from the softdevice. If the events are not pulling out from the softdevice fast enough, the buffer will be full and it will start NACKing incoming packet. But using&amp;nbsp;NRF_SDH_DISPATCH_MODEL_INTERRUPT&amp;nbsp; may not be the best when using with FreeRTOS as far as I understand.&lt;/p&gt;
&lt;p&gt;We need to find out why adding a heavy task, at the same time having heavy BLE traffic causing the application fail to pull the events. We will have more resource to look into the case next week. We will update you what we find.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection failure when sending and receiving data simultaneously with SoftDevice 6.0 and SDK 15</title><link>https://devzone.nordicsemi.com/thread/140609?ContentTypeID=1</link><pubDate>Thu, 19 Jul 2018 07:54:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:afb63cf3-2f2c-4ac6-80c8-88e1f0290615</guid><dc:creator>JRRSoftware</dc:creator><description>&lt;p&gt;Hi, Do we have any progress?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection failure when sending and receiving data simultaneously with SoftDevice 6.0 and SDK 15</title><link>https://devzone.nordicsemi.com/thread/140267?ContentTypeID=1</link><pubDate>Mon, 16 Jul 2018 16:41:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e18b2b6c-77b1-4338-b0df-9a985390ecf8</guid><dc:creator>JRRSoftware</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I did further investigation and the problem is somehow related to RTOS. It occurs only when&amp;nbsp;NRF_SDH_DISPATCH_MODEL is&amp;nbsp;set as&amp;nbsp;NRF_SDH_DISPATCH_MODEL_POLLING.&lt;/p&gt;
&lt;p&gt;Moreover, once&amp;nbsp;SD_EVT_IRQHandler() is triggered and&amp;nbsp;softdevice_task() is handled immediatelly - there is&amp;nbsp;NO such issue. &lt;br /&gt;But if other task is doing something and&amp;nbsp;&lt;span&gt;softdevice_task() cannot be&amp;nbsp;handled immediatelly, then sometimes (but not always) the above isse is happening.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I&amp;#39;m not sure if I can use&amp;nbsp;NRF_SDH_DISPATCH_MODEL_INTERRUPT together with RTOS. For now it seems to be the only solution. What is your advice?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection failure when sending and receiving data simultaneously with SoftDevice 6.0 and SDK 15</title><link>https://devzone.nordicsemi.com/thread/140263?ContentTypeID=1</link><pubDate>Mon, 16 Jul 2018 16:20:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:974ee0d2-9a92-448a-b0d8-e2fb09308cab</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I just tried it here and can reproduce the issue. We will start the investigation and get back to you when we have an update.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection failure when sending and receiving data simultaneously with SoftDevice 6.0 and SDK 15</title><link>https://devzone.nordicsemi.com/thread/140066?ContentTypeID=1</link><pubDate>Fri, 13 Jul 2018 12:44:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:04b60dc1-f20d-4f10-9f46-efffeb7a0a93</guid><dc:creator>JRRSoftware</dc:creator><description>&lt;p&gt;Hi again,&lt;/p&gt;
&lt;p&gt;Answering your questions:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;br /&gt;Unfortunately, your suggestion regarding the line 239 in the port_cmsis_systick.c does not make any difference&lt;/li&gt;
&lt;li&gt;There are 2 functions that may throw the NRF_ERROR_RESOURCES error in this case:&lt;br /&gt;sd_ble_gatts_hvx and sd_ble_gattc_write. However, as mentioned in my previous post, bi-directional data transfer is not necessary to reproduce the problem. It is enough to send data one way only. And this is what I do in the second version of my test case (link below).&lt;/li&gt;
&lt;li&gt;When the issue occur on the device (doesn&amp;rsquo;t matter if on Master or Slave) it starts to be &amp;ldquo;blind and deaf&amp;rdquo; for BT events, data and notifications. However, other functions seems to work normally (there is no assertion, no hard fault, no stack overflow etc). You can reproduce this using my test case and watch log lines still printed from both sides.&lt;/li&gt;
&lt;li&gt;Also, there are no high priority tasks in the provided examples. Furthermore, changing priorities for the dummy task (simulation workload) and SDH tasks does not make any difference either.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Here is the simplified code example (JRR_DeadlockTest_v2) to reproduce the problem:&lt;br /&gt;&lt;a href="https://drive.google.com/file/d/1cl-Jf66eCD9CofyAoUP2_DnUTtVYsx_4/view?usp=sharing"&gt;drive.google.com/.../view&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You can easily compare this code with original ble_app_att_mtu_throughput ad see there are only few changes. I use 2 dev boards (PCA 10040) to reproduce the problem. Usually, it takes few seconds from the data transfer start but sometimes need to run the test again.&lt;br /&gt;&lt;br /&gt;The simulated workload is a task with a loop counting&amp;nbsp;to 16000 every 5ms.&lt;/p&gt;
&lt;p&gt;Any other suggestions?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection failure when sending and receiving data simultaneously with SoftDevice 6.0 and SDK 15</title><link>https://devzone.nordicsemi.com/thread/140025?ContentTypeID=1</link><pubDate>Fri, 13 Jul 2018 08:49:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:069cd3a1-ea0e-47cf-8193-210d84d06db1</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Thanks for providing us the example code. We unfortunately under reduced staff, so we couldn&amp;#39;t try to test this right away.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;But could you try&amp;nbsp;at line 239 in SDKv15\external\freertos\portable\CMSIS\nrf52\port_cmsis_systick.c to change&amp;nbsp;#if 0&amp;nbsp; to&amp;nbsp;#if 1 ? This is a bug fix added to reduce power consumption but may have a side effect.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You mentioned&amp;nbsp;NRF_ERROR_RESOURCES&amp;nbsp; show on both side, what would throw that error on the central side ? Could you findout which function throwing that error ?&amp;nbsp;&lt;br /&gt;&lt;br /&gt;You mentioned the central doesn&amp;#39;t throw disconnected event even though you turn off the client. It sound like the central actually got an assertion/hardfault. Have you check if it still functional normally ? like the main loop still executed?&lt;/p&gt;
&lt;p&gt;Also, please make sure that you are not doing something in APP_HIGH priority for too long, and too often, doing that you may block the softdevice from throwing events, including DISCONNECTED event.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection failure when sending and receiving data simultaneously with SoftDevice 6.0 and SDK 15</title><link>https://devzone.nordicsemi.com/thread/139971?ContentTypeID=1</link><pubDate>Thu, 12 Jul 2018 23:33:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dd8e3a29-46c4-4c3f-a33a-c368571f27c8</guid><dc:creator>JRRSoftware</dc:creator><description>&lt;p&gt;&lt;span style="font-weight:400;"&gt;Hi,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;I&amp;rsquo;ve managed to reproduce the problem using modified example code from the SDK.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;The source code is available here:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://drive.google.com/file/d/11sXPxutC-bAeOTJMpi_ByRIw5-pwclDq/view?usp=sharing"&gt;&lt;span style="font-weight:400;"&gt;https://drive.google.com/file/d/11sXPxutC-bAeOTJMpi_ByRIw5-pwclDq/view?usp=sharing&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;I&amp;rsquo;ve modified the &lt;/span&gt;&lt;b&gt;ble_app_att_mtu_throughput &lt;/b&gt;&lt;span style="font-weight:400;"&gt;example to use FreeRTOS.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;A dummy RTOS task emulates a workload. In this case it is a loop counting to 100000 every 10 ms (roughly). It is more likely to trigger the issue if there is a serie of &amp;ldquo;short&amp;rdquo; workloads. If there are &amp;ldquo;heavy&amp;rdquo; tasks, but not triggered so often, the issue appears less likely.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;To replicate the problem, &lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Put the &lt;/span&gt;&lt;b&gt;JRR_DeadlockTest&lt;/b&gt;&lt;span style="font-weight:400;"&gt; folder next to the &lt;/span&gt;&lt;b&gt;ble_app_att_mtu_throughput&lt;/b&gt;&lt;span style="font-weight:400;"&gt; (inside SDK_15\examples\ble_central_and_peripheral\experimental).&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Follow the steps described in the instruction for the &lt;/span&gt;&lt;b&gt;ble_app_att_mtu_throughput &lt;/b&gt;&lt;span style="font-weight:400;"&gt;example.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Additional log lines shows how many times sending data ended successfully or threw an NRF_ERROR_RESOURCES error. After few seconds you should see that no data has been sent successfully (all ended throwing an error). A screenshot below shows this situation:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/8244.log.jpg" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Red arrow shows the point where the BT connection failed. Each time it happens in slightly different point. Sometimes sooner sometimes later. No assertion and no disconnection event will be triggered when this situation happen (on TESTER device).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;The key facts to reproduce the problem are:&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Use FreeRTOS,&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Emulate workload in a task that is triggered fairly often,&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Send data using timer (or a task). Do not send data as a response for the BLE_GATTS_EVT_HVN_TX_COMPLETE event&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Try to &amp;ldquo;flood&amp;rdquo; the BT characteristic by sending too much data.&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Sending data bi-directionally is not necessary (as I thougt originally). It is possible to reproduce the problem by sending data only one way.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;I hope it helps. Do you have any suggestions so far?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection failure when sending and receiving data simultaneously with SoftDevice 6.0 and SDK 15</title><link>https://devzone.nordicsemi.com/thread/139831?ContentTypeID=1</link><pubDate>Thu, 12 Jul 2018 07:41:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:83c6c11c-9921-4c49-8904-1c8f28896377</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi JRR,&lt;/p&gt;
&lt;p&gt;There could be some bug fixes to avoid deadlock actually causing more deadlock. We will need to reproduce the issue here.&lt;/p&gt;
&lt;p&gt;Could you provide a simplified version can on nRF52DK, sending dummy data that can reproduce the issue so we can test here ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;How it usually take for you to see the issue ?&amp;nbsp;if testing in less noisy environment would it make a significant difference ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>