<?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>How hold I2C turn on in idle state</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/91100/how-hold-i2c-turn-on-in-idle-state</link><description>Dear Nordic Engineers 
 I have a problem and would like to ask you about the I2C work state. 
 I read this link: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/services/pm/api/index.html?highlight=pm_device_action_resume#c.pm_device_action</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 23 Aug 2022 11:01:19 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/91100/how-hold-i2c-turn-on-in-idle-state" /><item><title>RE: How hold I2C turn on in idle state</title><link>https://devzone.nordicsemi.com/thread/382893?ContentTypeID=1</link><pubDate>Tue, 23 Aug 2022 11:01:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e28c5cd1-fe2d-448b-a939-46afdac0dab7</guid><dc:creator>Michal</dc:creator><description>&lt;p&gt;It is a bit up to you, but at least try it after it&amp;#39;s fully initialized, or maybe right after sending the first i2c command?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Michal&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How hold I2C turn on in idle state</title><link>https://devzone.nordicsemi.com/thread/382864?ContentTypeID=1</link><pubDate>Tue, 23 Aug 2022 09:31:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a2d054e4-c160-4933-b596-d178f620d0cc</guid><dc:creator>Hannibalhz</dc:creator><description>&lt;p&gt;Dear Michal&lt;/p&gt;
&lt;p&gt;Did you mean I can use pm_device_state_lock() function to lock the I2C when start init or start work time?&lt;/p&gt;
&lt;p&gt;what time is use &lt;span&gt;use pm_device_state_lock()?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Please give me a good suggestion.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How hold I2C turn on in idle state</title><link>https://devzone.nordicsemi.com/thread/382717?ContentTypeID=1</link><pubDate>Mon, 22 Aug 2022 13:49:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d416aa24-9f05-4019-a47f-269b412da687</guid><dc:creator>Michal</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I see that there is also a function &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.0.2/zephyr/services/pm/api/index.html#c.pm_device_state_lock"&gt;pm_device_state_lock()&lt;/a&gt;. Maybe try that one out?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Michal&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How hold I2C turn on in idle state</title><link>https://devzone.nordicsemi.com/thread/382610?ContentTypeID=1</link><pubDate>Mon, 22 Aug 2022 09:23:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a63851ac-e06b-4a8e-93f1-e2ccca8a259e</guid><dc:creator>Hannibalhz</dc:creator><description>&lt;p&gt;Dear Michal&lt;/p&gt;
&lt;p&gt;The error code is -5, message shows:error on i2c line occurred for message 0&lt;/p&gt;
&lt;p&gt;So, may I use the &lt;span&gt;pm_device_busy to solve this problem?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If I can use it, what should I do?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Please give me some good suggestion.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How hold I2C turn on in idle state</title><link>https://devzone.nordicsemi.com/thread/382427?ContentTypeID=1</link><pubDate>Fri, 19 Aug 2022 10:30:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:407b857f-36ae-40a2-aa9f-a61e383a19d9</guid><dc:creator>Michal</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;So are you using that function directly or through the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.0.2/zephyr/hardware/peripherals/i2c.html"&gt;Zephyr&amp;#39;s I2C driver&lt;/a&gt;?&lt;/p&gt;
&lt;p&gt;I personally did not see any issues myself while using that, but I have contacted the developers about your case.&lt;/p&gt;
&lt;p&gt;I would still appreciate if you could send me some code that&amp;#39;s failing for troubleshooting in the meantime.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Michal&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How hold I2C turn on in idle state</title><link>https://devzone.nordicsemi.com/thread/382365?ContentTypeID=1</link><pubDate>Fri, 19 Aug 2022 02:37:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7248efed-a8a0-4f8d-84d8-5dc8fb95bb7c</guid><dc:creator>Hannibalhz</dc:creator><description>&lt;p&gt;Dear Michal&lt;/p&gt;
&lt;p&gt;I use&amp;nbsp;&lt;span&gt;NCS\v2.0.0\zephyr\drivers\i2c\i2c_nrfx_twi.c/i2c_nrfx_twi_transfer() function.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I would like to know how to use&amp;nbsp;pm_device_busy_set() and&amp;nbsp;pm_device_busy_clear() to contral the I2C work state.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Please give me some good suggestions.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How hold I2C turn on in idle state</title><link>https://devzone.nordicsemi.com/thread/382277?ContentTypeID=1</link><pubDate>Thu, 18 Aug 2022 12:39:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9c0e883d-1c3b-44c4-a67b-3f7ddb11d665</guid><dc:creator>Michal</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I tried to look into it, but I could not reproduce your issue. I will ask the developers about those two functions though.&lt;/p&gt;
&lt;p&gt;Which I2C functions were you using for the transfer?&lt;br /&gt;How does the CPU enters the idle state?&lt;/p&gt;
&lt;p&gt;Would it be possible to upload the offending code (preferably a minimal working example if possible), so that I could take a better look into it?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Michal&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>