<?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>NRF5340 power management</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/93338/nrf5340-power-management</link><description>Hi Devzone, 
 I am using an nrf5340 with NCS v2.0.0 and am trying to implement power management. I found this link and have been taking hints from it https://github.com/nrfconnect/sdk-zephyr/tree/main/samples/boards/nrf/system_off 
 This is the scenario</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 01 Jun 2023 11:39:01 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/93338/nrf5340-power-management" /><item><title>RE: NRF5340 power management</title><link>https://devzone.nordicsemi.com/thread/428705?ContentTypeID=1</link><pubDate>Thu, 01 Jun 2023 11:39:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:16996f24-946f-4772-8e80-f4806afae43d</guid><dc:creator>Dker19</dc:creator><description>&lt;p&gt;Thanks &lt;a href="https://devzone.nordicsemi.com/members/aryan"&gt;Susheel Nuguru&lt;/a&gt;&amp;nbsp;, So I can achieve this using lower down the peripherals like uart, radio etc. For other power handing I need to check, If you have some additional thoughts and some examples please share them here for power handling. help will be appreciated.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF5340 power management</title><link>https://devzone.nordicsemi.com/thread/428695?ContentTypeID=1</link><pubDate>Thu, 01 Jun 2023 11:11:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d701f77e-98b9-4a40-a9ac-e9742a197200</guid><dc:creator>amar_d11</dc:creator><description>&lt;p&gt;&lt;span&gt;&amp;quot;Yes,&amp;nbsp;but you can add your own power handling that you think is suitable to your application.&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;can you please provide an example of how to do it?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF5340 power management</title><link>https://devzone.nordicsemi.com/thread/428690?ContentTypeID=1</link><pubDate>Thu, 01 Jun 2023 10:57:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2fc39eb3-7a7c-4e94-ab37-bcdf75fcaf54</guid><dc:creator>Susheel Nuguru</dc:creator><description>[quote user="Dip1993"]&lt;p&gt;So other states like&amp;nbsp;&lt;/p&gt;
&lt;p&gt;1. PM_STATE_RUNTIME_IDLE&lt;br /&gt;2. PM_STATE_SUSPEND_TO_IDLE&lt;br /&gt;3. PM_STATE_STANDBY&lt;br /&gt;4. PM_STATE_SUSPEND_TO_RAM&lt;br /&gt;5. PM_STATE_SUSPEND_TO_DISK&lt;/p&gt;
&lt;p&gt;are not supported by nrf5340? Can you please confirm? &lt;/p&gt;[/quote]
&lt;p&gt;Yes,&amp;nbsp;but you can add your own power handling that you think is suitable to your application. We seems to have only implemented the deep sleep power state in the power manager.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF5340 power management</title><link>https://devzone.nordicsemi.com/thread/428686?ContentTypeID=1</link><pubDate>Thu, 01 Jun 2023 10:40:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2d1bf62a-41d5-43cb-a6dd-672dadce071e</guid><dc:creator>Dker19</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/khelmutlord"&gt;khelmutlord&lt;/a&gt;&amp;nbsp;I am working on nrf5340 dk board, I just want to confirm power state supported by nrf5340. As per your pointer only supported power management state is&amp;nbsp;PM_STATE_SOFT_OFF. So other states like&amp;nbsp;&lt;/p&gt;
&lt;p&gt;1. PM_STATE_RUNTIME_IDLE&lt;br /&gt;2. PM_STATE_SUSPEND_TO_IDLE&lt;br /&gt;3. PM_STATE_STANDBY&lt;br /&gt;4. PM_STATE_SUSPEND_TO_RAM&lt;br /&gt;5. PM_STATE_SUSPEND_TO_DISK&lt;/p&gt;
&lt;p&gt;are not supported by nrf5340? Can you please confirm? also, I required to lower the the power consumption so if I don&amp;#39;t want to reset the board which will be reset if I use&amp;nbsp;PM_STATE_SOFT_OFF. So what is the best way to do that. do I need to suspend the peripherals like uart,radio etc without using putting device in any power management state.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/dip1993"&gt;Dker19&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF5340 power management</title><link>https://devzone.nordicsemi.com/thread/428001?ContentTypeID=1</link><pubDate>Mon, 29 May 2023 16:11:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1c9b6aea-a035-405d-a0ec-d4346e14c0f0</guid><dc:creator>Dker19</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/aryan"&gt;Susheel Nuguru&lt;/a&gt;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/khelmutlord"&gt;khelmutlord&lt;/a&gt;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/wifiuser"&gt;wifiuser&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I required the device should be run in low power mode when there is no work to do. so I gone through the state.h and found that there are different states. So I choose&amp;nbsp;&amp;nbsp;PM_STATE_RUNTIME_IDLE or PM_STATE_SUSPEND_TO_IDLE so just curious like if I select one of them then on some event how to wakeup the device to a normal state.&lt;/p&gt;
&lt;p&gt;Also is there any best state other than PM_STATE_SOFT_OFF which help my device to save more power without losing its context?&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Do I just need to disable/suspend the resources that are taking more power,&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;this will save the power consumption of the battery&lt;/strong&gt;. CPU will automatically go into sleep mode?&lt;/p&gt;
&lt;p&gt;Can you please enlighten why there are different modes and When to use them? like,&amp;nbsp;PM_STATE_RUNTIME_IDLE,&amp;nbsp;PM_STATE_SUSPEND_TO_IDLE,&amp;nbsp;PM_STATE_STANDBY and&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;PM_STATE_SUSPEND_TO_RAM.&lt;br /&gt;Also how to use them?&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF5340 power management</title><link>https://devzone.nordicsemi.com/thread/427569?ContentTypeID=1</link><pubDate>Thu, 25 May 2023 14:35:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0bd1a994-cf7a-48ea-a3c2-fc790e3a28ca</guid><dc:creator>khelmutlord</dc:creator><description>&lt;p&gt;Looking at the code for the nRF5340&amp;#39;s power management, you can see that the only supported power management state is PM_STATE_SOFT_OFF.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/zephyrproject-rtos/zephyr/blob/69d0dce978e11a17e6605a42067374ca56767483/soc/arm/nordic_nrf/nrf53/power.c#L10"&gt;https://github.com/zephyrproject-rtos/zephyr/blob/69d0dce978e11a17e6605a42067374ca56767483/soc/arm/nordic_nrf/nrf53/power.c#L10&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Each driver (UART, for example) supports certain power management modes as well:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/zephyrproject-rtos/zephyr/blob/fd346e846f1474468cd2bd67e7208b9560edd60e/drivers/serial/uart_nrfx_uart.c#LL1070C12-L1070C31"&gt;https://github.com/zephyrproject-rtos/zephyr/blob/fd346e846f1474468cd2bd67e7208b9560edd60e/drivers/serial/uart_nrfx_uart.c#LL1070C12-L1070C31&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;i.e.&amp;nbsp;PM_DEVICE_ACTION_SUSPEND and&amp;nbsp;PM_DEVICE_ACTION_RESUME&lt;/p&gt;
&lt;p&gt;If the&amp;nbsp;default UART driver uses too much power, consider using the Nordic LPUART library.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/drivers/uart_nrf_sw_lpuart.html#uart-nrf-sw-lpuart"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/drivers/uart_nrf_sw_lpuart.html#uart-nrf-sw-lpuart&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Helmut Lord&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF5340 power management</title><link>https://devzone.nordicsemi.com/thread/427367?ContentTypeID=1</link><pubDate>Thu, 25 May 2023 05:01:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c3fe2a55-7b4e-44ac-8b4e-6614c5708114</guid><dc:creator>amar_d11</dc:creator><description>&lt;p&gt;What can be done to create a simple scenario where an application has a gpio and an uart and the end goal is to put the system in sleep mode?&lt;/p&gt;
&lt;p&gt;using&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;PM_STATE_SOFT_OFF&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;is not the solution for me .&lt;/p&gt;
&lt;p&gt;how to use the other power down modes ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF5340 power management</title><link>https://devzone.nordicsemi.com/thread/427317?ContentTypeID=1</link><pubDate>Wed, 24 May 2023 17:14:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1480a3d7-2020-4bdf-9959-bec0495dc199</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;This thread have somehow escaped my working queue and looking at the events it seems like I clicked some wrong button by mistake. I did not get this to work but since I did not hear from the author to remind me, I am guessing that they managed to make it work?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF5340 power management</title><link>https://devzone.nordicsemi.com/thread/427210?ContentTypeID=1</link><pubDate>Wed, 24 May 2023 11:49:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f0b1de37-6761-4ae5-8628-8d7dd55729d2</guid><dc:creator>amar_d11</dc:creator><description>&lt;p&gt;struct pm_state_info sleep_state = {PM_STATE_SUSPEND_TO_RAM, 0, 0};&lt;br /&gt; pm_state_force(0u, &amp;amp;sleep_state);&lt;/p&gt;
&lt;p&gt;how did you get this working??&lt;/p&gt;
&lt;p&gt;did you make any changes to&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;pm_state_set(); ?&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;a href="https://devzone.nordicsemi.com/members/aryan"&gt;Susheel Nuguru&lt;/a&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF5340 power management</title><link>https://devzone.nordicsemi.com/thread/398748?ContentTypeID=1</link><pubDate>Fri, 02 Dec 2022 11:57:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:09fcc250-882d-4f7c-bdf0-cf076316f321</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;I managed to reproduce this and I am not able to make SPIM2 or 4 to go to low power mode.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I have to dive a bit deeper into the lib and driver for this and rule out if this is a firmware issue. But since i am able to reproduce this, it is possible find the root cause for this. I will keep you updated. Thanks for your patience so far.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF5340 power management</title><link>https://devzone.nordicsemi.com/thread/398256?ContentTypeID=1</link><pubDate>Wed, 30 Nov 2022 09:00:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c6c47f51-d557-46a2-98d4-2935e14e5927</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Hi Oral, sorry for the delays, I will try to use your project settings today and debug this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF5340 power management</title><link>https://devzone.nordicsemi.com/thread/396373?ContentTypeID=1</link><pubDate>Fri, 18 Nov 2022 10:18:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e54fee26-23c4-45c6-a691-beda01d9174e</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Honestly, I have not tried this myself or seen any samples doing this.&lt;/p&gt;
&lt;p&gt;So I need to do some experimentation to see how this is done. I might have to attempt to do that early next week and provide you a solution for that.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF5340 power management</title><link>https://devzone.nordicsemi.com/thread/395846?ContentTypeID=1</link><pubDate>Tue, 15 Nov 2022 15:55:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1be35c58-7158-4577-93e4-e5520b8c84fe</guid><dc:creator>wifiuser</dc:creator><description>&lt;p&gt;My last issue now is how to effectively set the SPIM2 and SPIM4 into SUSPEND mode?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF5340 power management</title><link>https://devzone.nordicsemi.com/thread/395673?ContentTypeID=1</link><pubDate>Tue, 15 Nov 2022 05:45:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a19a9617-a771-4092-9558-64d3c40121f9</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Good to hear that the crash issue is resolved.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF5340 power management</title><link>https://devzone.nordicsemi.com/thread/395580?ContentTypeID=1</link><pubDate>Mon, 14 Nov 2022 14:07:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7132cbaf-6e40-4da4-b6fb-53293ae2bbb5</guid><dc:creator>wifiuser</dc:creator><description>&lt;p&gt;The crash for&amp;nbsp;&lt;span&gt;pm_device_action_run(i2c_dev, PM_DEVICE_ACTION_SUSPEND) turned&amp;nbsp;&lt;/span&gt;out to be a hardware issue. After switching boards it worked as expected. I had created another ticket for that as you suggested and updated that ticket to show that.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF5340 power management</title><link>https://devzone.nordicsemi.com/thread/395488?ContentTypeID=1</link><pubDate>Mon, 14 Nov 2022 08:58:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8f7a1a4a-6296-4a70-aeab-bfc3f42b4037</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Orai, Sorry for late response.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regarding my comment regarding PM_DEVICE_DT_DEFINE(SPIM(idx), we need to put that on hold.&lt;/p&gt;
&lt;p&gt;I have tried to replicate the issue you have by trying to modify the systemoff sample, but I am not able to replicate the crash your were mentioning when using&amp;nbsp;pm_device_action_run(i2c_dev, PM_DEVICE_ACTION_SUSPEND);&lt;/p&gt;
&lt;p&gt;Can I get your project so that I can do some quick tests on what your contexts your application is calling power management calls.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF5340 power management</title><link>https://devzone.nordicsemi.com/thread/395183?ContentTypeID=1</link><pubDate>Thu, 10 Nov 2022 16:51:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3d544f40-8e3b-4f9a-b883-c3c0b7126b14</guid><dc:creator>wifiuser</dc:creator><description>&lt;p&gt;Any updates on this issue?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF5340 power management</title><link>https://devzone.nordicsemi.com/thread/394768?ContentTypeID=1</link><pubDate>Tue, 08 Nov 2022 15:37:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:76788f68-9d82-4d71-8a31-9efac44bfde9</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Orai, I am sorry for delay, I was OoO and could not test this. I will test this tomorrow.&lt;/p&gt;
&lt;div style="left:182px;top:22.331px;"&gt;
&lt;div&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF5340 power management</title><link>https://devzone.nordicsemi.com/thread/394513?ContentTypeID=1</link><pubDate>Mon, 07 Nov 2022 16:05:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6e49130f-efaa-4abe-b4c6-d023fd67231c</guid><dc:creator>wifiuser</dc:creator><description>&lt;p&gt;Have you been able to verify the issue I am seeing and figure out a possible solution? Any updates/solution would be great.&lt;/p&gt;
&lt;p&gt;thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF5340 power management</title><link>https://devzone.nordicsemi.com/thread/394007?ContentTypeID=1</link><pubDate>Thu, 03 Nov 2022 17:51:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f24837a9-4290-4bb1-bec4-66befa9dec09</guid><dc:creator>wifiuser</dc:creator><description>&lt;p&gt;I attached a reduced version of my project with just SPIM2 to show the SPIM2 compilation issue I see when I want to include the&amp;nbsp;PM_DEVICE_DT_DEFINE&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/reduced_5F00_proj.zip"&gt;devzone.nordicsemi.com/.../reduced_5F00_proj.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF5340 power management</title><link>https://devzone.nordicsemi.com/thread/393688?ContentTypeID=1</link><pubDate>Wed, 02 Nov 2022 13:51:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7a991f46-2d94-4fb1-8c1b-967561408659</guid><dc:creator>wifiuser</dc:creator><description>&lt;p&gt;I would rather not post my entire project publicly. Can I get a private link to upload it so only you can see and debug it?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF5340 power management</title><link>https://devzone.nordicsemi.com/thread/393664?ContentTypeID=1</link><pubDate>Wed, 02 Nov 2022 13:11:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dea299c0-0a04-468f-9f31-5f2097e9de71</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;I have not tried this combo before, So I need to evaluate this myself, can you please upload your project here so that I can try to debug this myself here? It seems like the spi config and default pinctrl config are not allowing us to enable the SPIM2 instance, but not sure what extra needs to be done here.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF5340 power management</title><link>https://devzone.nordicsemi.com/thread/393313?ContentTypeID=1</link><pubDate>Mon, 31 Oct 2022 16:08:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e781c976-487a-472b-a6a3-c6ff1488e0a4</guid><dc:creator>wifiuser</dc:creator><description>&lt;p&gt;Thanks for the reply sorry to include so many different questions. I will open a different ticket for the other points as you suggested.&lt;/p&gt;
&lt;p&gt;Based on your reply, I see that in order to get the power management for SPIM2 enabled I have to this define&lt;pre class="ui-code" data-mode="text"&gt;PM_DEVICE_DT_DEFINE(SPIM(idx), spim_nrfx_pm_action);&lt;/pre&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;enabled but, that requires&amp;nbsp;&lt;/p&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;pre class="ui-code" data-mode="text"&gt;#define SPI_NRFX_SPIM_DEVICE(idx)&lt;/pre&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;After looking at&amp;nbsp; &lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/main/drivers/spi/spi_nrfx_spim.c"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/main/drivers/spi/spi_nrfx_spim.c&lt;/a&gt;&amp;nbsp;I see
&lt;div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_SPI_2_NRF_SPIM has to be enabled. It is not settable directly according to the documentation.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
In order to get that defined, I added these two new settings to my prj.conf file&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_SPI&lt;/span&gt;&lt;span&gt;=y&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_SPI_NRFX&lt;/span&gt;&lt;span&gt;=y&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;This results in a build error below for the expansion of that macro with regards to PINCTRL and legacy pins. What setting am I missing in my config file to get the PM_DEVICE_DT_DEFINE for my peripherals? Code builds fin and runs OK with those two settings but the power management doesn&amp;#39;t get enabled.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;pre class="ui-code" data-mode="text"&gt;-c C:/ncs/v2.0.0/zephyr/drivers/spi/spi_nrfx_spim.c
In file included from C:\ncs\v2.0.0\zephyr\include\zephyr\toolchain.h:50,
from C:\ncs\v2.0.0\zephyr\include\zephyr\init.h:10,
from C:\ncs\v2.0.0\zephyr\include\zephyr\device.h:29,
from C:\ncs\v2.0.0\zephyr\include\zephyr\drivers\spi.h:24,
from C:\ncs\v2.0.0\zephyr\drivers\spi\spi_nrfx_spim.c:7:
C:\ncs\v2.0.0\zephyr\include\zephyr\toolchain\gcc.h:77:36: error: static assertion failed: &amp;quot;/soc/peripheral@50000000/spi@b000 has legacy *-pin properties defined although PINCTRL is enabled&amp;quot;
77 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert(EXPR, &amp;quot;&amp;quot; MSG)
| ^~~~~~~~~~~~~~
c:\ncs\v2.0.0\zephyr\soc\arm\nordic_nrf\common\soc_nrf_common.h:229:2: note: in expansion of macro &amp;#39;BUILD_ASSERT&amp;#39;
229 | BUILD_ASSERT(!IS_ENABLED(CONFIG_PINCTRL) || \
| ^~~~~~~~~~~~
C:\ncs\v2.0.0\zephyr\drivers\spi\spi_nrfx_spim.c:518:2: note: in expansion of macro &amp;#39;NRF_DT_CHECK_PIN_ASSIGNMENTS&amp;#39;
518 | NRF_DT_CHECK_PIN_ASSIGNMENTS(SPIM(idx), 1, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\ncs\v2.0.0\zephyr\drivers\spi\spi_nrfx_spim.c:586:1: note: in expansion of macro &amp;#39;SPI_NRFX_SPIM_DEVICE&amp;#39;
586 | SPI_NRFX_SPIM_DEVICE(2);
| ^~~~~~~~~~~~~~~~~~~~
C:\ncs\v2.0.0\zephyr\include\zephyr\toolchain\gcc.h:77:36: error: static assertion failed: &amp;quot;/soc/peripheral@50000000/spi@a000 has legacy *-pin properties defined although PINCTRL is enabled&amp;quot;
77 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert(EXPR, &amp;quot;&amp;quot; MSG)
| ^~~~~~~~~~~~~~
c:\ncs\v2.0.0\zephyr\soc\arm\nordic_nrf\common\soc_nrf_common.h:229:2: note: in expansion of macro &amp;#39;BUILD_ASSERT&amp;#39;
229 | BUILD_ASSERT(!IS_ENABLED(CONFIG_PINCTRL) || \
| ^~~~~~~~~~~~
C:\ncs\v2.0.0\zephyr\drivers\spi\spi_nrfx_spim.c:518:2: note: in expansion of macro &amp;#39;NRF_DT_CHECK_PIN_ASSIGNMENTS&amp;#39;
518 | NRF_DT_CHECK_PIN_ASSIGNMENTS(SPIM(idx), 1, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\ncs\v2.0.0\zephyr\drivers\spi\spi_nrfx_spim.c:594:1: note: in expansion of macro &amp;#39;SPI_NRFX_SPIM_DEVICE&amp;#39;
594 | SPI_NRFX_SPIM_DEVICE(4);
| ^~~~~~~~~~~~~~~~~~~~
[140/431] Building C object zephyr/drivers/eeprom/CMakeFiles/drivers__eeprom.dir/eeprom_handlers.c.obj
[141/431] Building C object zephyr/drivers/spi/CMakeFiles/drivers__spi.dir/spi_handlers.c.obj
[142/431] Linking C static library zephyr\drivers\i2c\libdrivers__i2c.a
[143/431] Linking C static library zephyr\drivers\sensor\libdrivers__sensor.a
[144/431] Linking C static library zephyr\drivers\sensor\tmp116\libdrivers__sensor__tmp116.a
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: &amp;#39;c:\ncs\toolchains\v2.0.0\opt\bin\cmake.EXE&amp;#39; --build &amp;#39;c:\Projects\VHI\Code\oncodisc\build&amp;#39;&lt;/pre&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF5340 power management</title><link>https://devzone.nordicsemi.com/thread/393151?ContentTypeID=1</link><pubDate>Mon, 31 Oct 2022 08:00:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cb438094-b589-4b76-b8c5-80e98c8a6f58</guid><dc:creator>Susheel Nuguru</dc:creator><description>[quote user=""]What devices are supported by pm_device_action_run? It runs OK in the sample for UART0 listed above but not for I2C1 or SPI2.[/quote]
&lt;p&gt;&lt;img style="max-height:749px;max-width:461px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/922x1498/__key/communityserver-discussions-components-files/4/pastedimage1667199784216v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;Here you can see that the uart/i2c/spi implements the pm actions so it should be ok to call pm_actions on any of these peripherals as long as you are using nrfx drivers for these.&lt;/p&gt;
[quote user=""]Does the peripherals have to be un-initialized and the pins configured in output low mode for the greatest power saving?[/quote]
&lt;p&gt;The pin configurations and their release/assignment to the peripherals should be taken care by the drivers when they implement the pm states. The application should not do anything else apart from knowing that it does not start any transactions on the peripherals before calling the power management functions. I fyou look in&amp;nbsp;zephyr\drivers\i2c\i2c_nrfx_twim.c you can see life in function&amp;nbsp;i2c_nrfx_twim_recover_bus that the driver tries to set the pin states to the config that suits the state&lt;/p&gt;
[quote user=""]&lt;span style="font-size:inherit;"&gt;What is the correct order of operation for the peripherals:&lt;/span&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;For wakeup? Set to active state, then initialize or vice versa?&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt; For sleep? Set to suspend then un-initialize or vice versa?&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;[/quote]
&lt;p&gt;1. I would first initialize the peripheral and state the active state.&lt;br /&gt;2. I would first uninitialize the peripheral and set to suspend.&amp;nbsp;&lt;/p&gt;
[quote user=""]Should I even bother trying to run a pm_device_action_run on the I2C1, SPIM2, etc... or will the power management set that for me automatically?[/quote]
&lt;p&gt;The drivers in the nrfx lib implements the callback for the pm action, so the application can call them when needed.&lt;/p&gt;
[quote user=""]I have a tmp117 attached to I2C1 and am using the zephyr driver to communicate with it. How do you unconfigure the I2C1? Again is it even necessary to configure it, use it then unconfigure it after use to achieve power savings?[/quote]
&lt;p&gt;Please create a separate thread for this.&lt;/p&gt;
[quote user=""]Do I need to setup power states in my overlay file? I didn&amp;#39;t see one in the sample I sited above.[/quote]
&lt;p&gt;No, i do not see or know any pm states that you can set in device tree. There are some pinctrl states you can set for the pins but not for the peripherals.&lt;/p&gt;
&lt;p&gt;Please create separate tickets for the rest of the points, please do not mix too many questions into one as they tend to flood the ticket with unrelated info which is difficult to search for others.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF5340 power management</title><link>https://devzone.nordicsemi.com/thread/393050?ContentTypeID=1</link><pubDate>Fri, 28 Oct 2022 13:38:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7235fdae-d203-41d1-99d8-d0d7faecd7fd</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Seems like a lot of questions bundled into one thread. I will go through them on Monday and will try to answer you point by point.&lt;/p&gt;
&lt;div style="left:232px;top:-20.0028px;"&gt;
&lt;div&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>