<?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>disconnection</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/70760/disconnection</link><description>HI, 
 If I insert in the main loop ( in the connection branch ) the instruction &amp;quot;idle_state_handle();&amp;quot; 
 for (;;) { if (flag_connected==0) { idle_state_handle(); } else { idle_state_handle(); ..... 
 ..... 
 } 
 after the first connection, without send</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 25 Jan 2021 11:37:52 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/70760/disconnection" /><item><title>RE: disconnection</title><link>https://devzone.nordicsemi.com/thread/291009?ContentTypeID=1</link><pubDate>Mon, 25 Jan 2021 11:37:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3f623d76-e3fe-4138-8710-4b69b621a5a9</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;It is an architectural decision to choose the correct timeout of the WDT (which is different for different applications) so that there is a timer that wakes the chip before the WDT timesout. Tou need to choose the WDT timeout large enough for the wakeup timer frequency to make sense power efficiency wise.&lt;/p&gt;
&lt;p&gt;Yes, I understand it is a difficult decision to make and might need you to benchmark and come to an optimal values that suit your application.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: disconnection</title><link>https://devzone.nordicsemi.com/thread/290993?ContentTypeID=1</link><pubDate>Mon, 25 Jan 2021 11:03:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2edc7b50-3b70-4585-b49d-711494e3be44</guid><dc:creator>Marco Pennacchietti</dc:creator><description>&lt;p&gt;&lt;span class="VIiyi" lang="en"&gt;&lt;span class="JLqJ4b ChMk0b"&gt;&lt;span&gt;unfortunately I just discovered that it is impossible to disable the WDT&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;So, I need&amp;nbsp; the &lt;span class="VIiyi" lang="en"&gt;&lt;span class="JLqJ4b ChMk0b"&gt;&lt;span&gt;&amp;quot;idle_state_handle&amp;quot; and I need the WDT, but the WDT causes the micro reset.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="VIiyi" lang="en"&gt;&lt;span class="JLqJ4b ChMk0b"&gt;&lt;span&gt;to solve the problem I could put a timer that causes periodic exit from the &amp;quot;idle_state_handle&amp;quot;&amp;nbsp; in order to refresh the WDT, but it doesn&amp;#39;t seem like an elegant solution&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="VIiyi" lang="en"&gt;&lt;span class="JLqJ4b ChMk0b"&gt;&lt;span&gt;Marco&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="VIiyi" lang="en"&gt;&lt;span class="JLqJ4b ChMk0b"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: disconnection</title><link>https://devzone.nordicsemi.com/thread/290965?ContentTypeID=1</link><pubDate>Mon, 25 Jan 2021 10:01:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f573bacb-a236-4f91-94dc-046142cd3efa</guid><dc:creator>Marco Pennacchietti</dc:creator><description>&lt;p&gt;I have insert&amp;nbsp; &amp;quot;idle_state_handle&amp;quot; in both branch, just to understand.&lt;/p&gt;
&lt;p&gt;&lt;span class="VIiyi" lang="en"&gt;&lt;span class="JLqJ4b ChMk0b"&gt;&lt;span&gt;what I discovered is that I have (after 5 min and 25 second) a reset of the micro, then the reinitialization of the SD produces the disconnection. But if I remove the &amp;quot;idle_state_handle&amp;quot; the reset do not occour.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="VIiyi" lang="en"&gt;&lt;span class="JLqJ4b ChMk0b"&gt;&lt;span&gt;The problem was the WDT. If I use the call &amp;quot;idle_state_handle&amp;quot; I must disable before the WDT.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="VIiyi" lang="en"&gt;&lt;span class="JLqJ4b ChMk0b"&gt;&lt;span&gt;I think that il low power mode the time go very slow and the WDT condiction occour not after 4 second but after about 5 minute.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="VIiyi" lang="en"&gt;&lt;span class="JLqJ4b ChMk0b"&gt;&lt;span&gt;You confirm ?&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="VIiyi" lang="en"&gt;&lt;span class="JLqJ4b ChMk0b"&gt;&lt;span&gt;thanks for your help&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="VIiyi" lang="en"&gt;&lt;span class="JLqJ4b ChMk0b"&gt;&lt;span&gt;Marco&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: disconnection</title><link>https://devzone.nordicsemi.com/thread/290926?ContentTypeID=1</link><pubDate>Mon, 25 Jan 2021 07:32:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:83c6486d-986e-4ab5-993a-58941bc06637</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Hi Marco,&lt;/p&gt;
&lt;p&gt;I do not understand your code snippet here, is the idle_state_handle is called anyway both in &amp;quot;if&amp;quot; and also in &amp;quot;else&amp;quot;?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The connection is not normally lost in idle_state_handler because this function makes the chip go the system_idle (WFE sleep) and the softdevice event management still can wake the chip and keep the connection alive. I am not sure if the idle_state_handle is the sole reason for you to see the connection loss.&lt;/p&gt;
&lt;p&gt;Adding more code and context would help us in the forum understand more on why your system is losing connection.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>