<?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>TWI Infinate Loop</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/21639/twi-infinate-loop</link><description>I asked the following question, TWI Stuck Bus Recovery , last week and got a great answer which I implemented. I tested my implementation by changing the device addresses to see if my system could detect the problem, report it and continue to try and</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 27 Apr 2017 18:17:02 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/21639/twi-infinate-loop" /><item><title>RE: TWI Infinate Loop</title><link>https://devzone.nordicsemi.com/thread/84943?ContentTypeID=1</link><pubDate>Thu, 27 Apr 2017 18:17:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e4d1ca22-9178-430e-ba58-0dce28852a56</guid><dc:creator>WestCoastDaz</dc:creator><description>&lt;p&gt;Aryan,&lt;/p&gt;
&lt;p&gt;Thanks for the reply.  Would Nordic consider modifying the SDK in a future release to of the user_function() return an error code that would be tested in the while loop?  This why a timeout could be completed implemented in user code.&lt;/p&gt;
&lt;p&gt;Also, I&amp;#39;m not sure what you mean by &amp;quot;rather safe to configure the GPIO pin with a pull up rather than testing that this could be grounded by long term wearoff&amp;quot;&lt;/p&gt;
&lt;p&gt;Thanks,
Darren&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI Infinate Loop</title><link>https://devzone.nordicsemi.com/thread/84942?ContentTypeID=1</link><pubDate>Wed, 26 Apr 2017 07:46:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a6d7c351-b387-460f-8643-e1fc93894515</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;wouln&amp;#39;t it be rather safe to configure the GPIO pin with a pull up rather than testing that this could be grounded by long term wearoff?&lt;/p&gt;
&lt;p&gt;That said, you can do something like this&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;app_timer_call_back()
{
      p_app_twi-&amp;gt;internal_transaction_in_progress = false;
}

start_oneshot_app_timer_with_timeout
while (p_app_twi-&amp;gt;internal_transaction_in_progress)
{
    if (user_function)
    {
        user_function();
    }
}
stop_app_timer
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>