<?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>ble getting disconnected during data transmission</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/56835/ble-getting-disconnected-during-data-transmission</link><description>I have developed a code for transferring data through uart to ble. It is working properly. but when I add a line printf to my code the data transmission stops and ble will disconnected. This part is crucial for me since once the connection is established</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 21 Jan 2020 23:39:49 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/56835/ble-getting-disconnected-during-data-transmission" /><item><title>RE: ble getting disconnected during data transmission</title><link>https://devzone.nordicsemi.com/thread/230187?ContentTypeID=1</link><pubDate>Tue, 21 Jan 2020 23:39:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:959800b3-785a-490c-a4a8-76f4a0417ecd</guid><dc:creator>Turbo J</dc:creator><description>&lt;p&gt;One possible cause: Your ble event handler is running in interrupt context, and the UART interrupt cannot preemt it. This causes printf() to never return (deadlock).&lt;/p&gt;
&lt;p&gt;Possible solutions or workarounds: Run uart in higher (read: lower numerical value) priority.&lt;/p&gt;
&lt;p&gt;Or call the printf() from main loop (e.g. using a flag variable,&amp;nbsp; &amp;quot;Schedule handling library&amp;quot;).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>