<?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>SDK2.9.0 - QSPI and TWI driver power management (CONFIG_PM_DEVICE_RUNTIME)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/119825/sdk2-9-0---qspi-and-twi-driver-power-management-config_pm_device_runtime</link><description>Hi. 
 After migration from SDK2.7.0 to SDK2.9.0 I have issues with power mangement. CONFIG_PM_DEVICE_RUNTIME=y, which I used, causes that twi driver doesn&amp;#39;t start. I try to manage with this issue and call pm_device_runtime_enable(i2c_dev) when I init</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 19 Mar 2025 08:22:59 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/119825/sdk2-9-0---qspi-and-twi-driver-power-management-config_pm_device_runtime" /><item><title>RE: SDK2.9.0 - QSPI and TWI driver power management (CONFIG_PM_DEVICE_RUNTIME)</title><link>https://devzone.nordicsemi.com/thread/527954?ContentTypeID=1</link><pubDate>Wed, 19 Mar 2025 08:22:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5c26e354-008d-4414-a971-90438b515590</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]1. Is it right way? Is it enough to&amp;nbsp;make that twi_driver power management works automatically?[/quote]
&lt;p&gt;I bet that the change you see between v2.7.0 and v2.9.0 is related to &lt;a href="https://github.com/nrfconnect/sdk-zephyr/commit/9f0ebb64a610745f2dd14a4b6adae8b7023134fe"&gt;This Commit&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;From this, it looks to me that nrfx_twim_enable() is not longer called automatically by the TWI init code. So in this case, I agree that it looks like you will have to use Power Management to enable TWI now.&lt;/p&gt;
[quote user=""]2. How to manage qspi driver? (I have external flash on board). The same way will be OK? In this case, I have no idea where to call pm_device_runtime_enable.[/quote]
&lt;p&gt;No, external flash over QSPI is a bit different. I believe that this should be enabled at first. Then you can put the external flash into Deep Power Down (DPD) mode + uninit the QSPI using the Power Management API. See here for &lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/9f0ebb64a610745f2dd14a4b6adae8b7023134fe/drivers/flash/nrf_qspi_nor.c#L1261"&gt;driver code&lt;/a&gt; (And wake it up the also).&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>