<?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 locks on nRF51822 v3</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/23979/twi-locks-on-nrf51822-v3</link><description>hello, 
 i am experiencing issues with the TWI library on the smart beacon kit rev. 1.3.0 which features the v3 of the nRF51822. i had the same experience on the new nRF52840(preview devkit) but it is not happening as often there. 
 doing some research</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 03 Aug 2017 07:54:59 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/23979/twi-locks-on-nrf51822-v3" /><item><title>RE: TWI locks on nRF51822 v3</title><link>https://devzone.nordicsemi.com/thread/94407?ContentTypeID=1</link><pubDate>Thu, 03 Aug 2017 07:54:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d346bc75-822a-47e2-9830-75d22310b4eb</guid><dc:creator>martin</dc:creator><description>&lt;p&gt;hello - yeah that&amp;#39;s just it. i switched to app_twi and use it to implement a more robust communication with the I2C transactions going on in the background. should have done so in the first place i guess ;) otherwise the issue was really a mechanical one, guess it&amp;#39;s not a good idea to have I2C or SPI on thin wires .. thanks !&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI locks on nRF51822 v3</title><link>https://devzone.nordicsemi.com/thread/94406?ContentTypeID=1</link><pubDate>Wed, 02 Aug 2017 11:32:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6534e236-af51-487c-af04-749b9d5081cc</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Martin,&lt;/p&gt;
&lt;p&gt;The potential dead lock is SDK v13.x where we introduced an timeout in the while loop.
Please have a look at the implementation in SDK v13.x:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;  hw_timeout = HW_TIMEOUT; //10000
 while ((hw_timeout &amp;gt; 0) &amp;amp;&amp;amp; twi_transfer(p_twi,   &amp;amp;p_cb-&amp;gt;error, &amp;amp;p_cb-&amp;gt;bytes_transferred,   (uint8_t *)p_data, length,  no_stop))
        {
            hw_timeout--;
        }
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI locks on nRF51822 v3</title><link>https://devzone.nordicsemi.com/thread/94402?ContentTypeID=1</link><pubDate>Tue, 01 Aug 2017 14:28:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0b7795e6-dae6-4765-863c-e5cdfe5bb6a2</guid><dc:creator>martin</dc:creator><description>&lt;p&gt;that&amp;#39;s exactly what&amp;#39;s happening here. essentially the same thing happens on both the nRF52 and the nRF51 &amp;gt; except that i had to solder mini-wires to the beacon kit (the pads are extremely small). it only happens more often on the beacon due to the fact that only a little move in the wires will kill the transfer. on the nRF52 i essentially have to short them for the driver to fail.&lt;/p&gt;
&lt;p&gt;my question here is: does the peripheral give up here or is it just the blocking-wait in the driver?&lt;/p&gt;
&lt;p&gt;if its the latter - can i circumvent this by using the non-blocking version or are both using the same while-loop? if the non-blocking doesn&amp;#39;t have this problem i can simply time-out the transfers and essentially implement some fault tolerance here.&lt;/p&gt;
&lt;p&gt;there&amp;#39;s no way i get an approval for a prototype-PCB, so i&amp;#39;ll have to live with dangling wires.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI locks on nRF51822 v3</title><link>https://devzone.nordicsemi.com/thread/94403?ContentTypeID=1</link><pubDate>Tue, 01 Aug 2017 14:15:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:65bf5353-2b89-4246-9b8d-737bc6178f29</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;I see. Isn&amp;#39;t it purely mechanical problem? As far as I see nRF51822 Beacon Kit doesn&amp;#39;t have any good PIN header so i suppose you&amp;#39;ve soldered the sensor right on the PCB pins? Or are there any clumpsy wires hanging around the HW in the air? I could imagine any issue with levels on these lines because of short or dropped voltage from 3V3 pull-ups will kill current transfer.... just random ideas. To be fair I&amp;#39;ve switched to nRF52 exactly because lack of wired interfaces and weaknesses of the once which nRF51 has (I know, this is now what you want to hear, but maybe a way to save some time i  your life?:)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI locks on nRF51822 v3</title><link>https://devzone.nordicsemi.com/thread/94400?ContentTypeID=1</link><pubDate>Tue, 01 Aug 2017 14:07:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3cf83d19-0a03-4a7a-a4e5-524cb0cd7874</guid><dc:creator>martin</dc:creator><description>&lt;p&gt;btw: i&amp;#39;m not running any BLE connection / no softdevice yet.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI locks on nRF51822 v3</title><link>https://devzone.nordicsemi.com/thread/94401?ContentTypeID=1</link><pubDate>Tue, 01 Aug 2017 14:03:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9c518f7e-fd3e-4af5-ae45-03c1c4357fea</guid><dc:creator>martin</dc:creator><description>&lt;ul&gt;
&lt;li&gt;the nRF is the I2C master, only one slave connected.&lt;/li&gt;
&lt;li&gt;10k pull-ups are used for SDA/SCL (the slave is supplied by the same 3V3 power-supply as the nRF)&lt;/li&gt;
&lt;li&gt;exactly: TWI is working fine until some disturbances happen (in this case acceleration)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;the I2C sensor is an accelerometer, so the whole device will move quite significantly. the screenshot shows that the TWI connection &amp;quot;dies&amp;quot; upon a sudden movement.&lt;/p&gt;
&lt;p&gt;it wouldn&amp;#39;t be much of an issue to implement a recovery mechanism on a higher level (e.g., monitor the sensor to be &amp;quot;alive&amp;quot;), but i want to avoid changing the drivers since i don&amp;#39;t want to dig in deep into the peripherals, also because i&amp;#39;d like to be able to switch between nRF2/nRF1 series by simply changing the SDK.&lt;/p&gt;
&lt;p&gt;thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI locks on nRF51822 v3</title><link>https://devzone.nordicsemi.com/thread/94405?ContentTypeID=1</link><pubDate>Tue, 01 Aug 2017 13:36:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b0521180-e54a-4c7a-8529-ebb9fc5385b4</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;Just a basic sanity check:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Is your nRF51 I2C master or slave?&lt;/li&gt;
&lt;li&gt;Do you have proper pull-up resistors on the wires?&lt;/li&gt;
&lt;li&gt;You say &amp;quot;TWI goes down&amp;quot; in the first screenshot but there it seems that two characters (Write + Address + one byte) are transferred properly. What exactly is the failure?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In general I2C slave had troubles on all nRF51 revisions to run stable while there is BLE connection ongoing, only TWI (I2C) Master has dedicated HW to survive in such conditions...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI locks on nRF51822 v3</title><link>https://devzone.nordicsemi.com/thread/94404?ContentTypeID=1</link><pubDate>Tue, 01 Aug 2017 13:24:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c1bc0c2e-88a9-4909-bbdf-dd56f834e67b</guid><dc:creator>martin</dc:creator><description>&lt;p&gt;attached screenshot - TWI goes down
&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/2017_2D00_08_2D00_01_5F00_twi_5F00_errtrace.png"&gt;2017-08-01_twi_errtrace.png&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;attached trace from saleae logic
&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/2017_2D00_08_2D00_01_5F00_twi_5F00_errtrace.csv"&gt;2017-08-01_twi_errtrace.csv&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;attached logicdata
&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/2017_2D00_08_2D00_01_5F00_twi_5F00_errtrace.logicdata"&gt;2017-08-01_twi_errtrace.logicdata&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>