<?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 bus freeze after several thousand tx/rx cycles</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/23540/twi-bus-freeze-after-several-thousand-tx-rx-cycles</link><description>I&amp;#39;m periodically polling a TWI sensor with a blocking call, as in 
 ret_code_t err_code;
m_xfer_done = false;

err_code = nrf_drv_twi_tx(&amp;amp;i2c, address, subAddress, 1, true);
APP_ERROR_CHECK(err_code);
while (m_xfer_done == false) {};
 
if (err_code</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 18 Jul 2017 18:28:11 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/23540/twi-bus-freeze-after-several-thousand-tx-rx-cycles" /><item><title>RE: TWI bus freeze after several thousand tx/rx cycles</title><link>https://devzone.nordicsemi.com/thread/92461?ContentTypeID=1</link><pubDate>Tue, 18 Jul 2017 18:28:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:426d3ddd-5d27-48a0-b47f-600b8324c2df</guid><dc:creator>JTL</dc:creator><description>&lt;p&gt;I have no idea why this helps, but all problems vanish when I enable the softdevice. It&amp;#39;s weird, since I&amp;#39;m not actually using the softdevice, but all I&amp;#39;ve done is&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;SOFTDEVICE_HANDLER_INIT(&amp;amp;clock_lf_cfg, NULL);
softdevice_app_ram_start_get(&amp;amp;ram_start);
softdevice_enable(&amp;amp;ram_start);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and now things are rock-solid. 28,000 data collection and FLASH-write cycles and still going strong....&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI bus freeze after several thousand tx/rx cycles</title><link>https://devzone.nordicsemi.com/thread/92462?ContentTypeID=1</link><pubDate>Mon, 17 Jul 2017 11:28:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fef8dcbd-cf02-4337-b72d-e28fb971ab7b</guid><dc:creator>Stian R&amp;#248;ed Hafskjold</dc:creator><description>&lt;p&gt;What does the APP_ERROR_CHECK() tell you? Does it ever end up in there with an error code, or is it stuck in the while loop waiting for the &lt;code&gt;m_xfer_done&lt;/code&gt; flag?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>