<?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>Correct TWI library for use with SoftDevice?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/7330/correct-twi-library-for-use-with-softdevice</link><description>Hello 
 I&amp;#39;m trying to communicate with an sensor over the TWI HW interface during a BLE connection with the S110 soft-device, and every time I try to use the TWI bus the nRF51 goes into reset. I&amp;#39;ve tried many different variations of edited TWI libraries</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 21 Jul 2015 11:49:12 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/7330/correct-twi-library-for-use-with-softdevice" /><item><title>RE: Correct TWI library for use with SoftDevice?</title><link>https://devzone.nordicsemi.com/thread/25959?ContentTypeID=1</link><pubDate>Tue, 21 Jul 2015 11:49:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:34ef2d1e-0841-4372-88ed-9eb7f983066a</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;kilianod, please update this thread, if this answer helped you then please click the ✓ to the left of the answer so that others can come and look here.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Correct TWI library for use with SoftDevice?</title><link>https://devzone.nordicsemi.com/thread/25958?ContentTypeID=1</link><pubDate>Fri, 29 May 2015 00:21:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0f62e7d3-1b20-4142-8fdc-e2b3894e64ab</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;The TWI libraries, like all the other libraries, work perfectly for most developers most of the time.  I would agree that twi hardware library has, since the rev 1 hardware, had the workaround for the non-functioning shortcuts in that revision baked into it and that uses PPI channels directly, which didn&amp;#39;t work after the softdevice was activated because PPI was marked as a restricted peripheral, thus leading to a load of confusion and various hacked up versions of the driver replacing the direct PPI calls with a softdevice PPI call.&lt;/p&gt;
&lt;p&gt;The volume of confusing posts and workarounds which that causes tends to lead people to the believe the TWI driver doesn&amp;#39;t work, when in fact it basically works just fine.&lt;/p&gt;
&lt;p&gt;There seems to be some effort to clean that up in SDK 8.1 with older drivers being put in an &amp;#39;incubated&amp;#39; folder and new drivers with the &lt;em&gt;drv&lt;/em&gt; embedded in their name having been written without the fixes for old hardware issues.&lt;/p&gt;
&lt;p&gt;However if you&amp;#39;ve tried all those things then your problem most likely likes somewhere else. You need to figure out where you&amp;#39;re getting into reset (what do you mean by that anyway exactly). What&amp;#39;s the last line executed, is it in the TWI driver or elsewhere?&lt;/p&gt;
&lt;p&gt;And you&amp;#39;re using an invalid combination of SDK for your hardware by the way. The last compatible SDK for rev 2 hardware is 6.1.0. SD 8.0.0 is compatible, but there&amp;#39;s no downloadable complete package which has SD 8 and an SDK for rev 2, so if you want to take one package, the last one available for rev 2 is SDK 6.1.0 + SD 7.1.0.&lt;/p&gt;
&lt;p&gt;Either way - the HW TWI driver in 6.1.0 or 7.x or 8.x is all pretty much the same, it works modulo the PPI channel usage annoyance. Can you figure out where you are getting to reset and post some code and then perhaps someone can help you more.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>