<?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>Error 195952641 on I2C, when power management is enabled.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/76574/error-195952641-on-i2c-when-power-management-is-enabled</link><description>Hello, when developing our application, we run into a problem. We are running Zephyr 2.4.0 on nRF52840 MCU. We use LSM303AGR sensor, which is supported by zephyr LIS2DH driver. The threshold exceeded interrupt from sensor are used, and after some time</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 07 Jul 2021 12:07:35 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/76574/error-195952641-on-i2c-when-power-management-is-enabled" /><item><title>RE: Error 195952641 on I2C, when power management is enabled.</title><link>https://devzone.nordicsemi.com/thread/318972?ContentTypeID=1</link><pubDate>Wed, 07 Jul 2021 12:07:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:20de5276-3a67-43e7-8de3-e3976f523764</guid><dc:creator>Simon</dc:creator><description>[quote user="Kacper "]I haven&amp;#39;t measured the current consumption, but will do this probably this week. [/quote]
&lt;p&gt;If you measure a low current with everything inside &lt;span&gt;twi_nrfx_pm_control() commented out&lt;/span&gt; then you have a workaround for this issue.&lt;/p&gt;
[quote user="Kacper "]I understand that its hard. Unfortunately I&amp;#39;m not able to connect logic analyzer to I2C lines, due to small size of components and the board itself. I was trying to do it, but with no luck. [/quote]
&lt;p&gt;A logic trace would be very useful. I will see if I can get a hold of a LSM303 sensor and try to reproduce the issue on my side.&lt;/p&gt;
[quote user="Kacper "]When I use twim instead of twi, I can only communicate with one device (the LSM303 sensor shows as two devices on the bus), but when we used only accelerometer with twim, the problem didn&amp;#39;t occur.[/quote]
&lt;p&gt;The TWIM should be able to communicate with multiple slaves connected to the same bus, so I&amp;#39;m not sure what&amp;#39;s going on.&lt;/p&gt;
&lt;p&gt;I will wait for you current measurement results and look into the issue further if needed.&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: Error 195952641 on I2C, when power management is enabled.</title><link>https://devzone.nordicsemi.com/thread/317388?ContentTypeID=1</link><pubDate>Mon, 28 Jun 2021 07:25:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:23cae56d-0c26-47e2-a911-0a0022582411</guid><dc:creator>Kacper </dc:creator><description>&lt;p&gt;I understand that its hard. Unfortunately I&amp;#39;m not able to connect logic analyzer to I2C lines, due to small size of components and the board itself. I was trying to do it, but with no luck. &lt;br /&gt;I haven&amp;#39;t measured the current consumption, but will do this probably this week. &lt;br /&gt;When I use twim instead of twi, I can only communicate with one device (the LSM303 sensor shows as two devices on the bus), but when we used only accelerometer with twim, the problem didn&amp;#39;t occur.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error 195952641 on I2C, when power management is enabled.</title><link>https://devzone.nordicsemi.com/thread/317337?ContentTypeID=1</link><pubDate>Fri, 25 Jun 2021 22:46:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:195ec207-428a-4b97-88c7-cecee13c4c23</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;It&amp;#39;s a little hard to debug since I don&amp;#39;t have access to that sensor right now.&amp;nbsp;&lt;span&gt;Would you be able to attach a logic analyzer to the output to see what&amp;#39;s going on?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;By the way, if you comment out everything inside&amp;nbsp;twi_nrfx_pm_control(), what current consumption do you see while in idle? I think the twi should release the HF clock after use automatically, so it shouldn&amp;#39;t use too much power then I think.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Have you tried to use twim instead of twi? Do you see this issue then?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;By the way, I&amp;#39;m going on vacation the next week, so I won&amp;#39;t be able to provide you any answers next week.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error 195952641 on I2C, when power management is enabled.</title><link>https://devzone.nordicsemi.com/thread/316601?ContentTypeID=1</link><pubDate>Wed, 23 Jun 2021 07:07:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cbfd9448-2308-49da-82ef-01266d312c68</guid><dc:creator>Kacper </dc:creator><description>&lt;p&gt;Changing power mode of sensor has no effect on this, the problem still occurs. I have found out that mocking function &lt;code&gt;twi_nrfx_pm_control &lt;/code&gt;in&lt;code&gt; i2c_nrfx_twi.c &lt;/code&gt;to do nothing&lt;code&gt; &lt;/code&gt;resolves the problem, but then the I2C is not stopped when MCU goes into low power mode.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error 195952641 on I2C, when power management is enabled.</title><link>https://devzone.nordicsemi.com/thread/316567?ContentTypeID=1</link><pubDate>Tue, 22 Jun 2021 23:04:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:69a6c1b5-89cf-40a3-865d-56e728a4ca30</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Let&amp;#39;s try to narrow down the issue, what happens if you change the value of&amp;nbsp;CONFIG_IIS2DH_POWER_MODE?&lt;/p&gt;
&lt;p&gt;Take a look at &amp;lt;sample&amp;gt;/build/zephyr/.config to see the initial value.&lt;/p&gt;
&lt;p&gt;Check out&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.5.1/kconfig/CONFIG_IIS2DH_POWER_MODE.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.5.1/kconfig/CONFIG_IIS2DH_POWER_MODE.html&lt;/a&gt;, to see the allowed values.&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>