<?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>suspend i2c does NOT reduce current?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/107358/suspend-i2c-does-not-reduce-current</link><description>Hi, 
 The custom board is 52832 with st lsm6dsr sensor. 
 I tried to suspend i2c by this code: 
 
 It worked with no errors. 
 But when I measure the current, its the same whether the i2c is suspended or resumed. There is NO power saving at all. I checked</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 01 Feb 2024 21:44:49 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/107358/suspend-i2c-does-not-reduce-current" /><item><title>RE: suspend i2c does NOT reduce current?</title><link>https://devzone.nordicsemi.com/thread/467254?ContentTypeID=1</link><pubDate>Thu, 01 Feb 2024 21:44:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e0736956-61ba-4d7e-9b20-dd4ec679d80a</guid><dc:creator>Mike Austin (LPI)</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/kfcube"&gt;kfcube&lt;/a&gt;&amp;nbsp;,&lt;/p&gt;
&lt;p&gt;Did you ever get this sorted out?&amp;nbsp; I&amp;#39;m having the same issue in my firmware (see &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/107932/problems-putting-uart-into-pm_device_action_suspend"&gt;this &lt;/a&gt;ticket).&lt;/p&gt;
&lt;p&gt;If I don&amp;#39;t enable &amp;amp;i2c0, then my idle state current is around 5uA.&amp;nbsp; If I enable it, and even if I don&amp;#39;t actually use it in my firmware, then the idle current goes up to around 300uA.&lt;/p&gt;
&lt;p&gt;Calling PM_SUSPEND on the i2c device doesn&amp;#39;t change the idle state current at all&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;Mike&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: suspend i2c does NOT reduce current?</title><link>https://devzone.nordicsemi.com/thread/465758?ContentTypeID=1</link><pubDate>Wed, 24 Jan 2024 10:44:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:40af6ba2-bbc3-4b9a-8cf5-115817bff702</guid><dc:creator>kfcube</dc:creator><description>&lt;p&gt;OK. Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: suspend i2c does NOT reduce current?</title><link>https://devzone.nordicsemi.com/thread/465752?ContentTypeID=1</link><pubDate>Wed, 24 Jan 2024 10:36:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9e72b03a-04db-4162-81b1-bdd1213fa378</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;You could try suggested workaround (described in the errata) after PM SUSPEND because this will power cycle the peripheral. If the power consumption remains high after that, the problem might not be with TWI.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: suspend i2c does NOT reduce current?</title><link>https://devzone.nordicsemi.com/thread/465527?ContentTypeID=1</link><pubDate>Tue, 23 Jan 2024 11:00:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:707ee6e5-5ec5-40bb-9a25-250f5a02ed4a</guid><dc:creator>kfcube</dc:creator><description>&lt;p&gt;As I have stated early on, the issue is the current NOT getting lower after i2c suspended. &lt;br /&gt;&lt;br /&gt;It has nothing to do with the errata as&amp;nbsp;that errata is about higher current than normal when using twim.&amp;nbsp;When not using twim, the current is low. But my&amp;nbsp;case is the current stayed once i2c used.&lt;/p&gt;
&lt;p&gt;And you should know that errata only happened when using twim, not twi.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So please&amp;nbsp;stop this kind of useless response and provided some useful suggestions.&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: suspend i2c does NOT reduce current?</title><link>https://devzone.nordicsemi.com/thread/465522?ContentTypeID=1</link><pubDate>Tue, 23 Jan 2024 10:31:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7913e3cc-fdd3-4a99-868c-9377238d13ca</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;Your nrf52832 chip could be potentially affected by this&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/errata_nRF52832_Rev3/ERR/nRF52832/Rev3/latest/anomaly_832_89.html?cp=5_2_1_0_1_26"&gt;errata&lt;/a&gt;. Due to this anomaly current consumption could be higher than expected. You could try to use provided workaround.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: suspend i2c does NOT reduce current?</title><link>https://devzone.nordicsemi.com/thread/465350?ContentTypeID=1</link><pubDate>Mon, 22 Jan 2024 13:52:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7aef0868-36a1-409a-b64f-caae46c62fd7</guid><dc:creator>kfcube</dc:creator><description>&lt;p&gt;NO, nothing better with twim.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: suspend i2c does NOT reduce current?</title><link>https://devzone.nordicsemi.com/thread/465314?ContentTypeID=1</link><pubDate>Mon, 22 Jan 2024 13:00:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:11755451-26b8-4a76-976a-68f17219eee9</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;Did you get lower current value using twim?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: suspend i2c does NOT reduce current?</title><link>https://devzone.nordicsemi.com/thread/465163?ContentTypeID=1</link><pubDate>Sat, 20 Jan 2024 00:44:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2eb9bf65-b806-4fd3-be90-1d5e43ff3e3e</guid><dc:creator>kfcube</dc:creator><description>&lt;p&gt;&amp;nbsp;I tested twim and it doesn&amp;#39;t stop current either.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: suspend i2c does NOT reduce current?</title><link>https://devzone.nordicsemi.com/thread/465068?ContentTypeID=1</link><pubDate>Fri, 19 Jan 2024 13:55:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:15b106f8-246f-4ae4-976d-6f9e7ee9c11c</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;Is there a specific reason for not using twim but using twi instead?&lt;br /&gt;You could test with twim instead of twi. You might be able to see some improvements.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: suspend i2c does NOT reduce current?</title><link>https://devzone.nordicsemi.com/thread/464941?ContentTypeID=1</link><pubDate>Fri, 19 Jan 2024 05:18:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9c1fa6a8-911a-4e44-bf40-3f190f06d42e</guid><dc:creator>kfcube</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Here is my full project conf:&lt;/p&gt;
&lt;p&gt;CONFIG_BT=y&lt;br /&gt;CONFIG_BT_SMP=n&lt;br /&gt;CONFIG_BT_PERIPHERAL=y&lt;br /&gt;CONFIG_BT_DIS_PNP=n&lt;br /&gt;CONFIG_BT_BAS=y&lt;br /&gt;CONFIG_BT_ATT_ENFORCE_FLOW=n&lt;br /&gt;CONFIG_CBPRINTF_FP_SUPPORT=y&lt;br /&gt;CONFIG_ADC=y&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;CONFIG_SENSOR=y&lt;br /&gt;CONFIG_I2C=y&lt;br /&gt;CONFIG_PINCTRL=y&lt;br /&gt;CONFIG_GPIO=y&lt;/p&gt;
&lt;p&gt;#power mgmt&lt;br /&gt;CONFIG_PM_DEVICE=y&lt;br /&gt;CONFIG_PM=y&lt;br /&gt;CONFIG_PM_DEVICE_RUNTIME=y&lt;/p&gt;
&lt;p&gt;#throughput&lt;br /&gt;CONFIG_BT_PERIPHERAL_PREF_MIN_INT=6&lt;br /&gt;CONFIG_BT_PERIPHERAL_PREF_MAX_INT=6&lt;br /&gt;CONFIG_BT_PERIPHERAL_PREF_TIMEOUT=400&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;CONFIG_BT_BUF_ACL_RX_SIZE=502&lt;br /&gt;CONFIG_BT_ATT_PREPARE_COUNT=2&lt;br /&gt;CONFIG_BT_L2CAP_TX_BUF_COUNT=10&lt;br /&gt;CONFIG_BT_L2CAP_TX_MTU=498&lt;br /&gt;CONFIG_BT_L2CAP_DYNAMIC_CHANNEL=y&lt;br /&gt;CONFIG_BT_CONN_TX_MAX=10&lt;br /&gt;CONFIG_BT_BUF_ACL_TX_COUNT=10&lt;br /&gt;CONFIG_BT_BUF_ACL_TX_SIZE=502&lt;/p&gt;
&lt;p&gt;CONFIG_BT_CTLR_DATA_LENGTH_MAX=251&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Other than the power management documents, I also read source code of twi related and found the twi is disabled after each single transfer. So the issue is 52832 doesn&amp;#39;t lower down current after i2c operation,&amp;nbsp; I tested and just one single read/write through i2c the current rised and not back.&lt;br /&gt;&lt;br /&gt;I am using twi, not twim, so it shouldn&amp;#39;t be&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/errata_nRF52832_Rev2/ERR/nRF52832/Rev2/latest/anomaly_832_89.html"&gt;erratum 89&lt;/a&gt;&amp;nbsp;issue.&lt;/p&gt;
&lt;p&gt;So anything wrong with my configuration?&lt;br /&gt;&lt;br /&gt;Thanks,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: suspend i2c does NOT reduce current?</title><link>https://devzone.nordicsemi.com/thread/464883?ContentTypeID=1</link><pubDate>Thu, 18 Jan 2024 16:12:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:213de0b4-e19b-444e-bf46-5334bce1080c</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;Could you provide your full project configuration?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: suspend i2c does NOT reduce current?</title><link>https://devzone.nordicsemi.com/thread/464718?ContentTypeID=1</link><pubDate>Thu, 18 Jan 2024 07:24:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:baeb8bbb-f82b-4123-b4e1-4057bd015dde</guid><dc:creator>kfcube</dc:creator><description>&lt;p&gt;Dejans, Thanks for your suggestion. I added those two conf items. The current down to 1.44mA after i2c suspended. So its working. However, I still can&amp;#39;t make the current down to 0.13mA which is before i2c active.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Any other configuration should i set?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: suspend i2c does NOT reduce current?</title><link>https://devzone.nordicsemi.com/thread/464579?ContentTypeID=1</link><pubDate>Wed, 17 Jan 2024 12:03:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:645f1ead-5e72-4e0c-b3f5-b44846503108</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;Could you try to add configuration options shown below to your configuration file?&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_PM_DEVICE=y
CONFIG_PM_DEVICE_RUNTIME=y&lt;/pre&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: suspend i2c does NOT reduce current?</title><link>https://devzone.nordicsemi.com/thread/464485?ContentTypeID=1</link><pubDate>Wed, 17 Jan 2024 00:15:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ddbb32a3-f748-40bc-9c87-ee9922811b6f</guid><dc:creator>kfcube</dc:creator><description>&lt;p&gt;NCS2.4.2&amp;nbsp; &amp;nbsp;&lt;br /&gt;&lt;br /&gt;Other questions not really matters to the case.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: suspend i2c does NOT reduce current?</title><link>https://devzone.nordicsemi.com/thread/464418?ContentTypeID=1</link><pubDate>Tue, 16 Jan 2024 14:16:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9e295aa4-edad-4ee0-89e2-1e26b9ddff59</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;Which NCS version do you use? Which NCS sample is your project based on?&lt;br /&gt;&lt;br /&gt;Could you provide detailed information on how you measure current on your end?&lt;br /&gt;&lt;br /&gt;Could you please also show your measurement setup?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: suspend i2c does NOT reduce current?</title><link>https://devzone.nordicsemi.com/thread/464380?ContentTypeID=1</link><pubDate>Tue, 16 Jan 2024 12:21:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a117a4f4-7b36-437e-a012-3d1e1620e7d9</guid><dc:creator>kfcube</dc:creator><description>&lt;p&gt;DeJan,&lt;br /&gt;&lt;br /&gt;Thanks for your reply. I did read the links you shared but I didn&amp;#39;t find anything useful. I didn&amp;#39;t enable uart/serial, and I didn&amp;#39;t use any external flash.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I have suspended i2c the way as your links about external flash, but the current not change at all. The help I need is how to lower current when I stop using i2c.&lt;/p&gt;
&lt;p&gt;As I have stated very clearly, that before the i2c used, the current is LOW so there is no need to fine tuning pins/ peripherals/etc. After i2c used, it becomes HIGH and I can&amp;#39;t lower it. So the problem is i2c, not others.&lt;/p&gt;
&lt;p&gt;I can&amp;#39;t config disable i2c because I need it. All I need to know is how to lower current when I don&amp;#39;t need it.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;So would you mind give me solid help rather than just sharing some links I have read?&lt;br /&gt;&lt;br /&gt;Thanks,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: suspend i2c does NOT reduce current?</title><link>https://devzone.nordicsemi.com/thread/464323?ContentTypeID=1</link><pubDate>Tue, 16 Jan 2024 09:04:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8d097d1e-ea3d-45ff-b192-814126598111</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="dejans"]You could start by reading about&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/test_and_optimize/optimizing/power_general.html#power-optimization-recommendations"&gt;recommendations for power optimization&lt;/a&gt;. Specifically, you could look at the example of&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/test_and_optimize/optimizing/power_general.html#put-the-external-flash-into-sleep-mode-in-inactivity-periods"&gt;putting external flash into sleep mode in inactivity periods&lt;/a&gt;.&amp;nbsp;[/quote]
&lt;p&gt;Did you find these links useful?&lt;/p&gt;
[quote user="kfcube"]How to put i2c off?&amp;nbsp;[/quote]
&lt;p&gt;I2C driver can be disabled by specifying CONFIG_I2C=n.&amp;nbsp;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: suspend i2c does NOT reduce current?</title><link>https://devzone.nordicsemi.com/thread/464173?ContentTypeID=1</link><pubDate>Mon, 15 Jan 2024 12:50:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4a1102bd-3d4d-4de6-ba48-03675e3571bb</guid><dc:creator>kfcube</dc:creator><description>&lt;p&gt;&lt;span&gt;Dejan，&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks for your reply. Yes I do want to know why there is no current reduction after i2c device suspended. I measured it keeps the high current even after disconnect.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;After flash, when the board start advertising, the current is 0.13mA.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;With i2c active, the current is 1.6mA.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;With sensor data notification, the current is 1.6mA.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Then stop data notification and disconnect,&amp;nbsp;the current keeps 1.6mA.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;How to put i2c off?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks,&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: suspend i2c does NOT reduce current?</title><link>https://devzone.nordicsemi.com/thread/464169?ContentTypeID=1</link><pubDate>Mon, 15 Jan 2024 12:38:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5b01f45a-e156-4bdb-b4a6-c53bd9cb324d</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;You could start by reading about&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/test_and_optimize/optimizing/power_general.html#power-optimization-recommendations"&gt;recommendations for power optimization&lt;/a&gt;. Specifically, you could look at the example of&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/test_and_optimize/optimizing/power_general.html#put-the-external-flash-into-sleep-mode-in-inactivity-periods"&gt;putting external flash into sleep mode in inactivity periods&lt;/a&gt;.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;You could try to disable I2C interface in the sensor driver and see if this helps in current reduction.&lt;br /&gt;&lt;br /&gt;Please let me know if you have any further questions.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>