<?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>disabling twi/i2c</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/10885/disabling-twi-i2c</link><description>Hey,
I am using twi_hw_master.c and twi_master.h libraries for twi and want to disable i2c to save power when not in use.
I use the following two lines to disable the i2c: 
 NRF_TWI1-&amp;gt;ENABLE = TWI_ENABLE_ENABLE_Disabled &amp;lt;&amp;lt; TWI_ENABLE_ENABLE_Pos; </description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 22 Jan 2016 23:54:57 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/10885/disabling-twi-i2c" /><item><title>RE: disabling twi/i2c</title><link>https://devzone.nordicsemi.com/thread/40708?ContentTypeID=1</link><pubDate>Fri, 22 Jan 2016 23:54:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1dbe3c37-a1ea-4d29-922d-3fdaf8b751e9</guid><dc:creator>Vandita</dc:creator><description>&lt;p&gt;This works to disable the i2c. Though the transfer function enables i2c if it is not enabled already which made it seem like i2c wasn&amp;#39;t getting disabled. Issue was resolved.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: disabling twi/i2c</title><link>https://devzone.nordicsemi.com/thread/40713?ContentTypeID=1</link><pubDate>Tue, 22 Dec 2015 17:10:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8b55aad9-d954-447d-a81c-0ba1f541d686</guid><dc:creator>Vandita</dc:creator><description>&lt;p&gt;I&amp;#39;m using twi_hw_master.c&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: disabling twi/i2c</title><link>https://devzone.nordicsemi.com/thread/40712?ContentTypeID=1</link><pubDate>Fri, 18 Dec 2015 10:12:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:67c16a63-87cb-483c-9c18-c910f5778030</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Are you using twi_hw_master.c or twi_sw_master.c?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: disabling twi/i2c</title><link>https://devzone.nordicsemi.com/thread/40711?ContentTypeID=1</link><pubDate>Thu, 17 Dec 2015 15:04:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:315bc7ad-90e9-4d76-af74-84d5f9482c62</guid><dc:creator>Vandita</dc:creator><description>&lt;p&gt;Hey Bjorn, I tried these statements and still the i2c is working. I have added the code files to the question.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: disabling twi/i2c</title><link>https://devzone.nordicsemi.com/thread/40707?ContentTypeID=1</link><pubDate>Thu, 17 Dec 2015 10:42:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b85df216-2a62-45df-8150-69166773641d</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;You&amp;#39;ll have to set the following registers:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;NRF_TWI1-&amp;gt;TASKS_STOP = 1;
NRF_TWI1-&amp;gt;ENABLE = TWI_ENABLE_ENABLE_Disabled &amp;lt;&amp;lt; TWI_ENABLE_ENABLE_Pos;
NRF_TWI1-&amp;gt;INTENCLR = (TWI_INTENCLR_STOPPED_Disabled &amp;lt;&amp;lt; TWI_INTENCLR_STOPPED_Pos)| \
                        (TWI_INTENCLR_RXDREADY_Disabled &amp;lt;&amp;lt; TWI_INTENCLR_RXDREADY_Pos)| \
                        (TWI_INTENCLR_TXDSENT_Disabled &amp;lt;&amp;lt; TWI_INTENCLR_TXDSENT_Pos)| \
                        (TWI_INTENCLR_ERROR_Disabled &amp;lt;&amp;lt; TWI_INTENCLR_ERROR_Pos)| \
                        (TWI_INTENCLR_BB_Disabled &amp;lt;&amp;lt; TWI_INTENCLR_BB_Pos);
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: disabling twi/i2c</title><link>https://devzone.nordicsemi.com/thread/40710?ContentTypeID=1</link><pubDate>Wed, 16 Dec 2015 14:04:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:41223cb0-8b11-4d21-bd29-a64a5f9ad1d5</guid><dc:creator>Vandita</dc:creator><description>&lt;p&gt;Hey Bjorn, Thanks for your response. I had earlier tried to use the nrf_drv_twi libraries but faced a lot of issues and moved to the incubated libraries instead. The nrf_drv_twi function takes a TWI instance as an argument and that&amp;#39;s not available as I&amp;#39;m using the other libraries.&lt;/p&gt;
&lt;p&gt;What other registers need to be written for disabling the TWI?
Thanks,
Vandita&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: disabling twi/i2c</title><link>https://devzone.nordicsemi.com/thread/40709?ContentTypeID=1</link><pubDate>Wed, 16 Dec 2015 11:35:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2f35944c-bf05-4525-b62f-153311f20eb1</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;The drivers located in the incubated folder are decrepated. Use the &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk51.v9.0.0/group__nrf__twi__drv.html#ga8d6abed43fc40ceca84ad0c1c584f83a"&gt;nrf_drv_twi_disable&lt;/a&gt; function in the nrf_drv_twi driver, please refer the TWI Driver Documentation, found &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk51.v9.0.0/group__nrf__twi__drv.html"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>