<?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 Stuck Bus Recovery</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/21508/twi-stuck-bus-recovery</link><description>What is the best method for attempting to recover from a stuck TWI bus after init? 
 I am currently initializing the TWI instance with .clear_bus_init=true but this only happens once during the init. 
 For example in the past we have had some issues</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 08 Apr 2019 15:35:35 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/21508/twi-stuck-bus-recovery" /><item><title>RE: TWI Stuck Bus Recovery</title><link>https://devzone.nordicsemi.com/thread/180837?ContentTypeID=1</link><pubDate>Mon, 08 Apr 2019 15:35:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7176d1f3-658a-4a52-8ca7-84abd7083a97</guid><dc:creator>WestCoastDaz</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/nihal"&gt;Nihal&lt;/a&gt; You can re-initialize the TWI after every transaction if you are using synchronous transactions but in my opinion, it&amp;#39;s not necessary as it&amp;#39;s not efficient from a CPU and power perspective. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI Stuck Bus Recovery</title><link>https://devzone.nordicsemi.com/thread/180595?ContentTypeID=1</link><pubDate>Sat, 06 Apr 2019 14:02:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c9ce280a-9876-463b-af79-e50319c26817</guid><dc:creator>Nihal</dc:creator><description>&lt;p&gt;I went through the API &amp;amp; had that doubt. Thanks for clarification. Aslo I&amp;#39;m repeating again, is it safe or fine to re-initialize TWI peripheral&amp;nbsp;&lt;span&gt;before every TWI transaction?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI Stuck Bus Recovery</title><link>https://devzone.nordicsemi.com/thread/180552?ContentTypeID=1</link><pubDate>Fri, 05 Apr 2019 15:47:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f9642913-7336-4510-8d66-eec7026136cd</guid><dc:creator>WestCoastDaz</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/nihal"&gt;Nihal&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Yes, you have to uninitialized reinitialize the TWI driver you else you will get an NRF_ERROR_INVALID_STATE when you init the driver.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI Stuck Bus Recovery</title><link>https://devzone.nordicsemi.com/thread/180463?ContentTypeID=1</link><pubDate>Fri, 05 Apr 2019 10:27:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3b3a4c81-6b9f-44c5-bb05-de31dc8d8bdf</guid><dc:creator>Nihal</dc:creator><description>&lt;p&gt;Hey,&lt;/p&gt;
&lt;p&gt;I also have a similar problem for which I need to clear the bus. I&amp;#39;m using nRF52840. My question is do we need to uninitialize and reinitialize or just only reinitialize without uninitialize is sufficient? Also, is it fine to do this re-initialization before every TWI transaction?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI Stuck Bus Recovery</title><link>https://devzone.nordicsemi.com/thread/84427?ContentTypeID=1</link><pubDate>Mon, 24 Apr 2017 06:10:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5683af73-1586-4db0-8883-5d077aaefe49</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;No problem and thanks :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI Stuck Bus Recovery</title><link>https://devzone.nordicsemi.com/thread/84426?ContentTypeID=1</link><pubDate>Fri, 21 Apr 2017 16:52:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1b0dda60-853f-47f7-a0e6-6e5f6fd13f8d</guid><dc:creator>WestCoastDaz</dc:creator><description>&lt;p&gt;Bjorn,&lt;/p&gt;
&lt;p&gt;Thanks for talking with the developers on this.  I had come to the same conclusion but I wanted to make sure that I wasn&amp;#39;t missing something.&lt;/p&gt;
&lt;p&gt;As always the support at Nordic is awesome!&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 Stuck Bus Recovery</title><link>https://devzone.nordicsemi.com/thread/84425?ContentTypeID=1</link><pubDate>Fri, 21 Apr 2017 11:02:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3e87a316-06b8-41d7-8554-3926383e3025</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Hi Darren,&lt;/p&gt;
&lt;p&gt;I discussed this with the developers and their recommendation was to reinitialize the TWI driver.&lt;/p&gt;
&lt;p&gt;However, there is an internal &lt;code&gt;twi_clear_bus&lt;/code&gt;function in &lt;code&gt;nrf_drv_twi.c&lt;/code&gt; that you could expose and use, but I would recommend the first solution, i.e. reinitialization of the driver.&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Bjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>