<?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 interface</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/50366/twi-interface</link><description>Which is the preferred way, accessing sensor via the TWI 
 1) NRFX_Driver 
 2) TWI HAL 
 what options do I need to select in the SDK_CONFIG.h to use the twi_driver api.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 30 Jul 2019 14:01:35 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/50366/twi-interface" /><item><title>RE: Twi interface</title><link>https://devzone.nordicsemi.com/thread/201293?ContentTypeID=1</link><pubDate>Tue, 30 Jul 2019 14:01:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a189cf4f-d232-41a9-bc5d-75d2c37a2ef7</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;The &amp;quot;abstraction&amp;nbsp;flow&amp;quot; for accessing the twi peripherals (and the other peripherals) in SDK 15.x.x is the following:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.3.0%2Fgroup__nrf__drv__twi.html&amp;amp;cp=5_1_6_9_0_36_1"&gt;TWI driver (Legacy layer)&lt;/a&gt; → &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.3.0%2Fgroup__nrfx__twi.html&amp;amp;cp=5_1_6_9_0_36_2"&gt;TWI driver (NRFX)&lt;/a&gt; &amp;nbsp;&amp;nbsp;→ &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.3.0%2Fgroup__nrf__twi__hal.html&amp;amp;cp=5_1_6_9_0_36_3"&gt;TWI HAL&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The Legacy TWI driver is a glue layer that remaps to the NRFX functions (see &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/41707/fails-to-use-nrfx-modules"&gt;this link&lt;/a&gt;&amp;nbsp;for an explanation how it works)
&lt;ul&gt;
&lt;li&gt;It is not pure remapping, some functionality is added in between&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;The NRFX TWI driver accesses the HAL driver, and makes it more simple to use the TWI HAL&amp;nbsp;&lt;/li&gt;
&lt;li&gt;The TWI HAL accesses the TWI registers directly&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Unless you need complete control and flexibility of what you are doing I would not recommend you to use the TWI HAL, as it requires a lot of extra work. Regarding the choice of driver, there has been some discussion about this. However, I would recommend you to use the TWI driver, since all the examples in the SDK uses this and I think&amp;nbsp;it will be less to troublesome. Also the legacy driver is more compatible with&amp;nbsp;BLE functionality.&lt;/p&gt;
&lt;p&gt;In the sdk_config.h file, you should use the legacy definitions and ignore the NRFX definitions, as explained &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/41707/fails-to-use-nrfx-modules"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Twi interface</title><link>https://devzone.nordicsemi.com/thread/201287?ContentTypeID=1</link><pubDate>Tue, 30 Jul 2019 13:51:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3da500b7-bb63-4f74-a886-66df38d1da86</guid><dc:creator>yashchabria</dc:creator><description>&lt;p&gt;I sorted the&amp;nbsp;&lt;span style="background-color:transparent;color:#11171a;float:none;font-family:&amp;#39;GT Eesti&amp;#39;,&amp;#39;Helvetica&amp;#39;,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:400;letter-spacing:normal;line-height:21px;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;"&gt;&amp;#39;NRF_DRV_TWI_INSTANCE_0&lt;/span&gt;&amp;#39; issue with sdk_config.h&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Twi interface</title><link>https://devzone.nordicsemi.com/thread/201043?ContentTypeID=1</link><pubDate>Mon, 29 Jul 2019 15:35:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1be494c0-2926-4a1f-b018-35169f7e254f</guid><dc:creator>yashchabria</dc:creator><description>&lt;p&gt;Also, what does this imply&amp;nbsp;&amp;nbsp;&amp;#39;NRF_DRV_TWI_INSTANCE_0&amp;#39; was not declared , I have enabled TWI in sdk_config.h&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>