<?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>Dynamically disable I2C</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/72145/dynamically-disable-i2c</link><description>I&amp;#39;m using NCS V1.5.0 and an nRF52840 
 The current draw with I2C enabled is around 200 micro amps 
 If I disable I2C using an overlay and recompile the current draw is around 9 micro amps. 
 Unfortunately I require I2C, is there a way to disable and enable</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 02 Mar 2021 00:15:35 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/72145/dynamically-disable-i2c" /><item><title>RE: Dynamically disable I2C</title><link>https://devzone.nordicsemi.com/thread/297026?ContentTypeID=1</link><pubDate>Tue, 02 Mar 2021 00:15:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:78b44253-c442-49d4-9075-57ebe659d137</guid><dc:creator>John</dc:creator><description>&lt;p&gt;Thanks very much for your advice. It helped me understand that I should be actually shutting down the transport mechanism, not the &amp;quot;traffic on the road&amp;quot;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Dynamically disable I2C</title><link>https://devzone.nordicsemi.com/thread/297021?ContentTypeID=1</link><pubDate>Mon, 01 Mar 2021 21:50:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5ea1ceec-7bfe-433a-9bd2-41b3f1e2897d</guid><dc:creator>John</dc:creator><description>&lt;p&gt;Thanks very much for your reply.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve tried that approach.&lt;/p&gt;
&lt;p&gt;As follows:&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve used&amp;nbsp;&lt;span&gt;DEVICE_PM_FORCE_SUSPEND_STATE as well as&amp;nbsp;DEVICE_PM_OFF_STATE Same result.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;void st_lis2dh_stop(void) {&lt;br /&gt; int err;&lt;br /&gt;k_sleep(K_MSEC(2));&lt;br /&gt; err = device_set_power_state(sensor_accelerometer, DEVICE_PM_FORCE_SUSPEND_STATE, NULL, NULL);&lt;br /&gt;if (err) {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; printk(&amp;quot;Can&amp;#39;t power off st_lis2dh %d \n&amp;quot;, err);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;I get the following at run time.&lt;/p&gt;
&lt;p&gt;Can&amp;#39;t power off si7055_sensor -35&lt;br /&gt;Can&amp;#39;t power off st_lis2dh -35&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Dynamically disable I2C</title><link>https://devzone.nordicsemi.com/thread/297019?ContentTypeID=1</link><pubDate>Mon, 01 Mar 2021 21:18:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c8b0265e-c59b-41f6-8865-2ecc1a082fb2</guid><dc:creator>Stian R&amp;#248;ed Hafskjold</dc:creator><description>&lt;p&gt;Hi, can you please check out my answer here about using the power management API:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/69534/thingy91-power-consumption/286010#286010"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/69534/thingy91-power-consumption/286010#286010&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It&amp;#39;s about uart1 and logging, but you should be able to follow the same principle for the i2c0 (or i2c1)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>