<?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>A sample for CAF power manager module</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/105861/a-sample-for-caf-power-manager-module</link><description>Hi Support team, 
 Is there a sample for how to use the CAF power manager module? 
 there are several components of power management(PM) in NCS and Zephyr: (1) &amp;#39;NCS CAF power manager module&amp;#39;, (2) system power management in Zephyr PM subsystem, (3) device</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 21 Nov 2023 13:58:32 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/105861/a-sample-for-caf-power-manager-module" /><item><title>RE: A sample for CAF power manager module</title><link>https://devzone.nordicsemi.com/thread/456699?ContentTypeID=1</link><pubDate>Tue, 21 Nov 2023 13:58:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cd84604d-46e0-4f30-989a-2085602550b8</guid><dc:creator>Yanpengwu</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;Yes, you are right, I need to enable the QSPI NOR driver with CONFIG_NORDIC_QSPI_NOR=y first.&lt;br /&gt;I can control the power mode of QSPI NOR Flash successfully now.&lt;/p&gt;
&lt;p&gt;Thank you so much.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Yanpeng Wu&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: A sample for CAF power manager module</title><link>https://devzone.nordicsemi.com/thread/456629?ContentTypeID=1</link><pubDate>Tue, 21 Nov 2023 10:08:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e955fe4d-b22d-4693-82e7-177379744bdc</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The &amp;#39;__device_dts_ord_126&amp;#39;&amp;#39; error&amp;nbsp;suggests&amp;nbsp;that the QSPI NOR driver is not enabled in your build. I&amp;nbsp;recommend you try&amp;nbsp;the same with the SPI NOR sample in&amp;nbsp;/zephyr/samples/drivers/spi_flash. If you look at the board specific Kconfig fragment in the boards directory, you can see that it sets&amp;nbsp;CONFIG_NORDIC_QSPI_NOR=y.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: A sample for CAF power manager module</title><link>https://devzone.nordicsemi.com/thread/456624?ContentTypeID=1</link><pubDate>Tue, 21 Nov 2023 09:42:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:133c59dc-8bc6-46ee-b8bd-fbf4cf83684a</guid><dc:creator>Yanpengwu</dc:creator><description>&lt;p&gt;Hi again,&lt;/p&gt;
&lt;p&gt;I want to try the lower power mode of QSPI flash on nRF5340 DK, because there is the same flash device on our custom board.&lt;br /&gt;I started with the sample &amp;#39;Multicore Hello World application&amp;#39;, and the planned steps are to get the device struct of the external flash device, then use pm_device_action_run() to suspend and resume it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;I tried two ways as below:&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;1&lt;/strong&gt;&amp;nbsp; &amp;nbsp;const struct device *const dev_QSPINorFlash = DEVICE_DT_GET(DT_CHOSEN(zephyr_flash));&lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!device_is_ready(dev_QSPINorFlash)) {&lt;br /&gt; &lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;printk(&amp;quot;%s: External Flash not ready.\n&amp;quot;, dev_QSPINorFlash-&amp;gt;name);&lt;br /&gt; &lt;strong&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/strong&gt;return 0;&lt;br /&gt; &lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;} else {&lt;br /&gt; &lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;printk(&amp;quot;%s: External Flash ready.\n&amp;quot;, dev_QSPINorFlash-&amp;gt;name);&lt;br /&gt; &lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;}&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;Compile erro&lt;/strong&gt;r: C:\ncs\v2.5.0\modules\hal\nordic\nrfx\hal\nrf_reset.h:190: undefined reference to `__device_dts_ord_126&amp;#39;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2&lt;/strong&gt; const struct device *const dev_QSPINorFlash = DEVICE_DT_GET(DT_ALIAS(spi_flash0));&lt;br /&gt; &lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;if (!device_is_ready(dev_QSPINorFlash)) {&lt;br /&gt; &lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;printk(&amp;quot;%s: External Flash not ready.\n&amp;quot;, dev_QSPINorFlash-&amp;gt;name);&lt;br /&gt; &lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;return 0;&lt;br /&gt; &lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;} else {&lt;br /&gt; &lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;printk(&amp;quot;%s: External Flash ready.\n&amp;quot;, dev_QSPINorFlash-&amp;gt;name);&lt;br /&gt; &lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;}&lt;br /&gt; &lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;Compile error:&lt;/strong&gt; C:\ncs\v2.5.0\modules\hal\nordic\nrfx\hal\nrf_reset.h:190: undefined reference to `__device_dts_ord_138&amp;#39;&lt;/p&gt;
&lt;p&gt;But the flash device was defined in the project both with &amp;#39;aliases&amp;#39; and &amp;#39;chosen&amp;#39; as below:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:159px;max-width:266px;" height="159" src="https://devzone.nordicsemi.com/resized-image/__size/532x318/__key/communityserver-discussions-components-files/4/pastedimage1700559562345v1.png" width="266" alt=" " /&gt;&lt;img style="max-height:137px;max-width:238px;" height="137" src="https://devzone.nordicsemi.com/resized-image/__size/476x274/__key/communityserver-discussions-components-files/4/pastedimage1700559657629v3.png" width="238" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Can I do it this way? Could you help give some guidance? Thank you very much.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: A sample for CAF power manager module</title><link>https://devzone.nordicsemi.com/thread/456467?ContentTypeID=1</link><pubDate>Mon, 20 Nov 2023 14:34:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f17eacbf-3fbe-461e-a6b5-748821d02c42</guid><dc:creator>Yanpengwu</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi Vidar,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thank you so much for these guidance, which are much helpful:).&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;Yanpeng Wu&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: A sample for CAF power manager module</title><link>https://devzone.nordicsemi.com/thread/456438?ContentTypeID=1</link><pubDate>Mon, 20 Nov 2023 13:51:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c9458b7f-3f65-4999-9250-6d350c84384f</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi ,&lt;/p&gt;
[quote userid="129665" url="~/f/nordic-q-a/105861/a-sample-for-caf-power-manager-module/456435"]1 For system power management, I don&amp;#39;t need to do anything, the APIs pm_system_suspend() and pm_system_resume() in /zephyr/subsys/pm/pm.c are kernel callback and will be called by OS automatically to follow the idle thread, and can be in the state of OS-IDLE and OS-SUSPENDED at the right time?[/quote]
&lt;p&gt;The power management subsystem is actually disabled by default starting from SDK 2.5.0:&amp;nbsp;&lt;a id="" href="https://github.com/nrfconnect/sdk-zephyr/commit/96b38273138f05dd06cf7a58fa361f401e773e5e"&gt;https://github.com/nrfconnect/sdk-zephyr/commit/96b38273138f05dd06cf7a58fa361f401e773e5e&lt;/a&gt;.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
[quote userid="129665" url="~/f/nordic-q-a/105861/a-sample-for-caf-power-manager-module/456435"]2 What need I to do is the devices power management, I can manage power consumption of UART/SPI/I2C and QSPI Nor flash with the API pm_device_action_run()?[/quote]
&lt;p&gt;Correct. Also, SPI, I2C does not need to be suspended as they power down automatically after transactions are completed. The reason UART must be suspended manually is that they system doesn&amp;#39;t know when the UART must be ready to receive data. Suspending a QSPI NOR device also involves sending a sleep instruction to the connected flash IC (this happens automatically when you call&amp;nbsp;&lt;span&gt;pm_device_action_run() here:&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/main/drivers/flash/nrf_qspi_nor.c#L1379"&gt;link&lt;/a&gt; if the IC supports DPD mode)&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: A sample for CAF power manager module</title><link>https://devzone.nordicsemi.com/thread/456435?ContentTypeID=1</link><pubDate>Mon, 20 Nov 2023 13:42:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:db558166-6317-4af9-8f16-c3cfeac7d361</guid><dc:creator>Yanpengwu</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;Thanks for your reply and the valuable information. Could I confirm several points of my understanding?&lt;/p&gt;
&lt;p&gt;1 For system power management, I don&amp;#39;t need to do anything, the APIs pm_system_suspend() and pm_system_resume() in /zephyr/subsys/pm/pm.c are kernel callback and will be called by OS automatically to follow the idle thread, and can be in the state of OS-IDLE and OS-SUSPENDED at the right time?&lt;br /&gt;2 What need I to do is the devices power management, I can manage power consumption of UART/SPI/I2C and QSPI Nor flash with the API pm_device_action_run()?&lt;/p&gt;
&lt;p&gt;If it is in this way, the power management on our application are much clear.&lt;br /&gt;Thank you very much.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: A sample for CAF power manager module</title><link>https://devzone.nordicsemi.com/thread/456390?ContentTypeID=1</link><pubDate>Mon, 20 Nov 2023 12:27:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:00095fdb-82dc-4672-9288-d1d34838d23d</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The power management is mostly automated when you use Zephyr with the nRF53 series. The program will automatically enter the idle thread where the chip will enter&amp;nbsp;&amp;nbsp;&lt;a title="System ON mode" href="https://infocenter.nordicsemi.com/topic/ps_nrf5340/chapters/pmu/doc/pmu.html?cp=4_0_0_3_0#topic"&gt;System ON mode&lt;/a&gt;&amp;nbsp;when there is no work to do. The exception is when you use QSPI NOR flash, UART, or similar that must be actively suspended by the application when not needed.&amp;nbsp;This can be done with the&amp;nbsp;device power management API.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/test_and_optimize/optimizing/power_general.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/test_and_optimize/optimizing/power_general.html&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>