<?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>I2C peripheral increase power after first transfer and de-init</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/80202/i2c-peripheral-increase-power-after-first-transfer-and-de-init</link><description>Hello, I have a problem with the I2C peripheral on my nrf53840. I enable i2c driver on my project and read sensors on the bus. Everything is OK. Then when with Power management I disable i2c for low power but i have an extra consumption of ~60 ua. If</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 12 Oct 2021 15:15:29 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/80202/i2c-peripheral-increase-power-after-first-transfer-and-de-init" /><item><title>RE: I2C peripheral increase power after first transfer and de-init</title><link>https://devzone.nordicsemi.com/thread/333777?ContentTypeID=1</link><pubDate>Tue, 12 Oct 2021 15:15:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f709f4bc-1e89-4843-80a6-d9e50167e5f9</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Try setting&amp;nbsp;&lt;span&gt;CONFIG_GPIO_NRF_INT_EDGE_USING_SENSE&lt;/span&gt;&lt;span&gt;=y in the prj.conf. According to the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.7.0/kconfig/CONFIG_GPIO_NRF_INT_EDGE_USING_SENSE.html?highlight=config_gpio_nrf_int_edge_using_sense#help"&gt;Kconfig Reference&lt;/a&gt;, it may cause a decreased current consumption. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I tested this with the sample zephyr/samples/basic/button (which uses gpio interrupts) and saw that the current consumption decreased from ~60uA to 2.2uA.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I will look more into this configuration tomorrow, what it does exactly, and if it has any consequences for your application.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Simon&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C peripheral increase power after first transfer and de-init</title><link>https://devzone.nordicsemi.com/thread/333523?ContentTypeID=1</link><pubDate>Mon, 11 Oct 2021 12:52:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:47fe8d19-3166-4a2c-a8f5-1f315329680b</guid><dc:creator>Corentin</dc:creator><description>&lt;p&gt;I found the problem. In fact, it&amp;#39;s not the i2c peripheral but when i need to configure a gpio on interrupt mode. &lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#ifdef CONFIG_LSM6DSO_TRIGGER
	if (cfg-&amp;gt;trig_enabled) {
		if (lsm6dso_init_interrupt(dev) &amp;lt; 0) {
			LOG_ERR(&amp;quot;Failed to initialize interrupt.&amp;quot;);
			return -EIO;
		}
	}
#endif&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;When i enable lsm6 on interrupt, the extra consumption of ~60 ua appear.&lt;/p&gt;
&lt;p&gt;The gpio part in lsm6dso&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;ret = gpio_pin_configure_dt(&amp;amp;cfg-&amp;gt;gpio_drdy, GPIO_INPUT);
	if (ret &amp;lt; 0) {
		LOG_DBG(&amp;quot;Could not configure gpio&amp;quot;);
		return ret;
	}

	gpio_init_callback(&amp;amp;lsm6dso-&amp;gt;gpio_cb,
			   lsm6dso_gpio_callback,
			   BIT(cfg-&amp;gt;gpio_drdy.pin));

	if (gpio_add_callback(cfg-&amp;gt;gpio_drdy.port, &amp;amp;lsm6dso-&amp;gt;gpio_cb) &amp;lt; 0) {
		LOG_DBG(&amp;quot;Could not set gpio callback&amp;quot;);
		return -EIO;
	}

	/* enable interrupt on int1/int2 in pulse mode */
	if (lsm6dso_int_notification_set(ctx, LSM6DSO_ALL_INT_PULSED) &amp;lt; 0) {
		LOG_DBG(&amp;quot;Could not set pulse mode&amp;quot;);
		return -EIO;
	}

	return gpio_pin_interrupt_configure_dt(&amp;amp;cfg-&amp;gt;gpio_drdy,
					       GPIO_INT_EDGE_TO_ACTIVE);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I try to configure my button also on interrupt mode (with the zephyr sample) and i found the same behaviour.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;With nrf5340 need to specify something else on GPIO for interrupt ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C peripheral increase power after first transfer and de-init</title><link>https://devzone.nordicsemi.com/thread/333464?ContentTypeID=1</link><pubDate>Mon, 11 Oct 2021 11:03:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cbc8e8d0-3a3e-4abf-a704-47f7ac577812</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Sorry for the delay, I&amp;#39;ve been quite busy lately. I will prioritize this the next days.&lt;/p&gt;
&lt;p&gt;By the way, I though Zephyr would handle power management automatically. What happens if you don&amp;#39;t disable&amp;nbsp;I2C after a transfer, what current consumption do you measure then?&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: I2C peripheral increase power after first transfer and de-init</title><link>https://devzone.nordicsemi.com/thread/332933?ContentTypeID=1</link><pubDate>Thu, 07 Oct 2021 06:44:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:561748db-f387-498b-88b9-d60491e098b8</guid><dc:creator>Corentin</dc:creator><description>&lt;p&gt;any news ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C peripheral increase power after first transfer and de-init</title><link>https://devzone.nordicsemi.com/thread/332260?ContentTypeID=1</link><pubDate>Mon, 04 Oct 2021 08:51:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2d37d4de-528a-4774-8da0-ccd785c773f1</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;I&amp;#39;m currently looking into this&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></channel></rss>