<?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>NCS v2.4.0: low power by example</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/100833/ncs-v2-4-0-low-power-by-example</link><description>Dear Support team, 
 I&amp;#39;m involved in the activity to migrate to NCS a project already developed &amp;amp; successfuly tested with using nRF52 SDK v17.1.0, over the custom board initially designed. 
 That custom board is based on nRF52832_xxAA, battery powered</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 19 Apr 2024 14:15:55 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/100833/ncs-v2-4-0-low-power-by-example" /><item><title>RE: NCS v2.4.0: low power by example</title><link>https://devzone.nordicsemi.com/thread/479749?ContentTypeID=1</link><pubDate>Fri, 19 Apr 2024 14:15:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cd4daad4-14d1-40cf-870a-09e6fe7faa01</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you have a specific problem, I would recommend that you create a dedicated thread on the topic and please share as much information as you can wrt. what the problem is and how your application is configured.&lt;/p&gt;
&lt;p&gt;GPIO Input vs. output does not do anything wrt. power consumption in this scenario. The only thing that is required is that you pull the signal to a defined level, per the action that is performed.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;CSN pin is handled by spi.h/spi_context.h:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/v3.5.99-ncs1/drivers/spi/spi_context.h#L257"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/v3.5.99-ncs1/drivers/spi/spi_context.h#L257&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;H&amp;aring;kon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS v2.4.0: low power by example</title><link>https://devzone.nordicsemi.com/thread/479745?ContentTypeID=1</link><pubDate>Fri, 19 Apr 2024 14:06:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dffcfbd7-9813-4b5b-9db8-4c6e68d4d5de</guid><dc:creator>Miguel Ferreira</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;Can you point me in the code where this is done ? Also to give more context why Im asking putting CS pin as input is due to power consumption, which I believe as input it will consume less. Or as&amp;nbsp;&lt;code class="notranslate"&gt;GPIO_OUTPUT_INACTIVE&lt;/code&gt; will consume the same more less ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS v2.4.0: low power by example</title><link>https://devzone.nordicsemi.com/thread/479737?ContentTypeID=1</link><pubDate>Fri, 19 Apr 2024 13:52:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:faa19a8c-c0bf-41e8-ade8-c4c5bde3937c</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;No, it is always set to an inactive state after a transaction.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS v2.4.0: low power by example</title><link>https://devzone.nordicsemi.com/thread/479731?ContentTypeID=1</link><pubDate>Fri, 19 Apr 2024 13:47:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1c909636-5c6e-463c-8bfe-570d174fd5f5</guid><dc:creator>Miguel Ferreira</dc:creator><description>&lt;p&gt;Thanks! Just to clarify, so before entering &amp;quot;sleep&amp;quot; while in SPIM mode I would need to set my CS gpio as input manually ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS v2.4.0: low power by example</title><link>https://devzone.nordicsemi.com/thread/479729?ContentTypeID=1</link><pubDate>Fri, 19 Apr 2024 13:40:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d5029191-1039-486e-b1bd-e0ee7c336758</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;That&amp;#39;s correct. CSN is kept inactive, and is handled as a normal gpio by the spi.h API.&lt;/p&gt;
&lt;p&gt;If you need to set this to a specific state, for instance if you&amp;#39;re powering off the external sensor, it has to be done as a part of your firmware routine for powering on/off the specific sensor.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS v2.4.0: low power by example</title><link>https://devzone.nordicsemi.com/thread/479720?ContentTypeID=1</link><pubDate>Fri, 19 Apr 2024 13:14:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0e70db64-33f2-4c73-aca0-03ec4bc5d396</guid><dc:creator>Miguel Ferreira</dc:creator><description>&lt;p&gt;Correct, but for example de SS pin is not changed to input because we are skipping the gpio_cfg. I debug the code since the point you mentioned and the nrf_gpio_cfg_default is always skipped. Am I correct ?&lt;br /&gt;&lt;br /&gt;Also:&lt;/p&gt;
&lt;div style="background-color:#1f1f1f;color:#cccccc;font-family:&amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:#c586c0;"&gt;#if&lt;/span&gt;&lt;span style="color:#569cd6;"&gt; &lt;/span&gt;&lt;span style="color:#c586c0;"&gt;defined&lt;/span&gt;&lt;span style="color:#569cd6;"&gt;(&lt;/span&gt;&lt;span style="color:#569cd6;"&gt;NRF_PSEL_SPIM&lt;/span&gt;&lt;span style="color:#569cd6;"&gt;)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#cccccc;"&gt; case &lt;/span&gt;&lt;span style="color:#569cd6;"&gt;NRF_FUN_SPIM_SCK&lt;/span&gt;&lt;span style="color:#cccccc;"&gt;:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#cccccc;"&gt; &lt;/span&gt;&lt;span style="color:#569cd6;"&gt;NRF_PSEL_SPIM&lt;/span&gt;&lt;span style="color:#cccccc;"&gt;(&lt;/span&gt;&lt;span style="color:#9cdcfe;"&gt;reg&lt;/span&gt;&lt;span style="color:#cccccc;"&gt;, SCK) &lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt;=&lt;/span&gt;&lt;span style="color:#cccccc;"&gt; &lt;/span&gt;&lt;span style="color:#9cdcfe;"&gt;pin&lt;/span&gt;&lt;span style="color:#cccccc;"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#cccccc;"&gt; &lt;/span&gt;&lt;span style="color:#9cdcfe;"&gt;write&lt;/span&gt;&lt;span style="color:#cccccc;"&gt; &lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt;=&lt;/span&gt;&lt;span style="color:#cccccc;"&gt; &lt;/span&gt;&lt;span style="color:#b5cea8;"&gt;0U&lt;/span&gt;&lt;span style="color:#cccccc;"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#cccccc;"&gt; &lt;/span&gt;&lt;span style="color:#9cdcfe;"&gt;dir&lt;/span&gt;&lt;span style="color:#cccccc;"&gt; &lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt;=&lt;/span&gt;&lt;span style="color:#cccccc;"&gt; &lt;/span&gt;&lt;span style="color:#4fc1ff;"&gt;NRF_GPIO_PIN_DIR_OUTPUT&lt;/span&gt;&lt;span style="color:#cccccc;"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#cccccc;"&gt; &lt;/span&gt;&lt;span style="color:#9cdcfe;"&gt;input&lt;/span&gt;&lt;span style="color:#cccccc;"&gt; &lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt;=&lt;/span&gt;&lt;span style="color:#cccccc;"&gt; &lt;/span&gt;&lt;span style="color:#4fc1ff;"&gt;NRF_GPIO_PIN_INPUT_CONNECT&lt;/span&gt;&lt;span style="color:#cccccc;"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#cccccc;"&gt; &lt;/span&gt;&lt;span style="color:#c586c0;"&gt;break&lt;/span&gt;&lt;span style="color:#cccccc;"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#cccccc;"&gt; case &lt;/span&gt;&lt;span style="color:#569cd6;"&gt;NRF_FUN_SPIM_MOSI&lt;/span&gt;&lt;span style="color:#cccccc;"&gt;:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#cccccc;"&gt; &lt;/span&gt;&lt;span style="color:#569cd6;"&gt;NRF_PSEL_SPIM&lt;/span&gt;&lt;span style="color:#cccccc;"&gt;(&lt;/span&gt;&lt;span style="color:#9cdcfe;"&gt;reg&lt;/span&gt;&lt;span style="color:#cccccc;"&gt;, MOSI) &lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt;=&lt;/span&gt;&lt;span style="color:#cccccc;"&gt; &lt;/span&gt;&lt;span style="color:#9cdcfe;"&gt;pin&lt;/span&gt;&lt;span style="color:#cccccc;"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#cccccc;"&gt; &lt;/span&gt;&lt;span style="color:#9cdcfe;"&gt;write&lt;/span&gt;&lt;span style="color:#cccccc;"&gt; &lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt;=&lt;/span&gt;&lt;span style="color:#cccccc;"&gt; &lt;/span&gt;&lt;span style="color:#b5cea8;"&gt;0U&lt;/span&gt;&lt;span style="color:#cccccc;"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#cccccc;"&gt; &lt;/span&gt;&lt;span style="color:#9cdcfe;"&gt;dir&lt;/span&gt;&lt;span style="color:#cccccc;"&gt; &lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt;=&lt;/span&gt;&lt;span style="color:#cccccc;"&gt; &lt;/span&gt;&lt;span style="color:#4fc1ff;"&gt;NRF_GPIO_PIN_DIR_OUTPUT&lt;/span&gt;&lt;span style="color:#cccccc;"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#cccccc;"&gt; &lt;/span&gt;&lt;span style="color:#9cdcfe;"&gt;input&lt;/span&gt;&lt;span style="color:#cccccc;"&gt; &lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt;=&lt;/span&gt;&lt;span style="color:#cccccc;"&gt; &lt;/span&gt;&lt;span style="color:#4fc1ff;"&gt;NRF_GPIO_PIN_INPUT_DISCONNECT&lt;/span&gt;&lt;span style="color:#cccccc;"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#cccccc;"&gt; &lt;/span&gt;&lt;span style="color:#c586c0;"&gt;break&lt;/span&gt;&lt;span style="color:#cccccc;"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#cccccc;"&gt; case &lt;/span&gt;&lt;span style="color:#569cd6;"&gt;NRF_FUN_SPIM_MISO&lt;/span&gt;&lt;span style="color:#cccccc;"&gt;:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#cccccc;"&gt; &lt;/span&gt;&lt;span style="color:#569cd6;"&gt;NRF_PSEL_SPIM&lt;/span&gt;&lt;span style="color:#cccccc;"&gt;(&lt;/span&gt;&lt;span style="color:#9cdcfe;"&gt;reg&lt;/span&gt;&lt;span style="color:#cccccc;"&gt;, MISO) &lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt;=&lt;/span&gt;&lt;span style="color:#cccccc;"&gt; &lt;/span&gt;&lt;span style="color:#9cdcfe;"&gt;pin&lt;/span&gt;&lt;span style="color:#cccccc;"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#cccccc;"&gt; &lt;/span&gt;&lt;span style="color:#9cdcfe;"&gt;dir&lt;/span&gt;&lt;span style="color:#cccccc;"&gt; &lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt;=&lt;/span&gt;&lt;span style="color:#cccccc;"&gt; &lt;/span&gt;&lt;span style="color:#4fc1ff;"&gt;NRF_GPIO_PIN_DIR_INPUT&lt;/span&gt;&lt;span style="color:#cccccc;"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#cccccc;"&gt; &lt;/span&gt;&lt;span style="color:#9cdcfe;"&gt;input&lt;/span&gt;&lt;span style="color:#cccccc;"&gt; &lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt;=&lt;/span&gt;&lt;span style="color:#cccccc;"&gt; &lt;/span&gt;&lt;span style="color:#4fc1ff;"&gt;NRF_GPIO_PIN_INPUT_CONNECT&lt;/span&gt;&lt;span style="color:#cccccc;"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#cccccc;"&gt; &lt;/span&gt;&lt;span style="color:#c586c0;"&gt;break&lt;/span&gt;&lt;span style="color:#cccccc;"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#c586c0;"&gt;#endif&lt;/span&gt;&lt;span style="color:#6a9955;"&gt; /* defined(NRF_PSEL_SPIM) */&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;I dont see the CS pin being changed here&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS v2.4.0: low power by example</title><link>https://devzone.nordicsemi.com/thread/479693?ContentTypeID=1</link><pubDate>Fri, 19 Apr 2024 12:05:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5a3ffc99-784c-44d1-8f7c-b8e090e0f15a</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;pinctrl takes over and configures the state based on your DT configuration:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/v3.5.99-ncs1/drivers/spi/spi_nrfx_spim.c#L546-L557"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/v3.5.99-ncs1/drivers/spi/spi_nrfx_spim.c#L546-L557&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;CSN is kept inactive (effectively handled as a normal gpio output, controlled by the spi.h API), and not touched by the devicetree.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS v2.4.0: low power by example</title><link>https://devzone.nordicsemi.com/thread/479659?ContentTypeID=1</link><pubDate>Fri, 19 Apr 2024 10:17:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:521d8e46-016f-4a51-a53a-08d542ec2cc2</guid><dc:creator>Miguel Ferreira</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;Sorry to jump in a old issue but I have some doubts also regarding pm_device_action_run(m_spi_dev, PM_DEVICE_ACTION_SUSPEND) on spi device. Basically, when entering in suspend the SPI driver should configure the CS pin but this config is being skipped: &lt;br /&gt;&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1713521645370v1.png" alt=" " /&gt;&lt;br /&gt;&lt;br /&gt;Where the default config is:&lt;/p&gt;
&lt;div style="background-color:#1f1f1f;color:#cccccc;font-family:&amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:#569cd6;"&gt;RF_STATIC_INLINE&lt;/span&gt;&lt;span style="color:#cccccc;"&gt; &lt;/span&gt;&lt;span style="color:#569cd6;"&gt;void&lt;/span&gt;&lt;span style="color:#cccccc;"&gt; &lt;/span&gt;&lt;span style="color:#dcdcaa;"&gt;nrf_gpio_cfg_default&lt;/span&gt;&lt;span style="color:#cccccc;"&gt;(&lt;/span&gt;&lt;span style="color:#4ec9b0;"&gt;uint32_t&lt;/span&gt;&lt;span style="color:#cccccc;"&gt; &lt;/span&gt;&lt;span style="color:#9cdcfe;"&gt;pin_number&lt;/span&gt;&lt;span style="color:#cccccc;"&gt;)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#cccccc;"&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#cccccc;"&gt; &lt;/span&gt;&lt;span style="color:#dcdcaa;"&gt;nrf_gpio_cfg&lt;/span&gt;&lt;span style="color:#cccccc;"&gt;(&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#cccccc;"&gt; &lt;/span&gt;&lt;span style="color:#9cdcfe;"&gt;pin_number&lt;/span&gt;&lt;span style="color:#cccccc;"&gt;,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#cccccc;"&gt; &lt;/span&gt;&lt;span style="color:#4fc1ff;"&gt;NRF_GPIO_PIN_DIR_INPUT&lt;/span&gt;&lt;span style="color:#cccccc;"&gt;,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#cccccc;"&gt; &lt;/span&gt;&lt;span style="color:#4fc1ff;"&gt;NRF_GPIO_PIN_INPUT_DISCONNECT&lt;/span&gt;&lt;span style="color:#cccccc;"&gt;,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#cccccc;"&gt; &lt;/span&gt;&lt;span style="color:#4fc1ff;"&gt;NRF_GPIO_PIN_NOPULL&lt;/span&gt;&lt;span style="color:#cccccc;"&gt;,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#cccccc;"&gt; &lt;/span&gt;&lt;span style="color:#4fc1ff;"&gt;NRF_GPIO_PIN_S0S1&lt;/span&gt;&lt;span style="color:#cccccc;"&gt;,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#cccccc;"&gt; &lt;/span&gt;&lt;span style="color:#4fc1ff;"&gt;NRF_GPIO_PIN_NOSENSE&lt;/span&gt;&lt;span style="color:#cccccc;"&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;How can I config the CS pin without the driver skipping it ?&lt;br /&gt;&lt;br /&gt;Thank you!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS v2.4.0: low power by example</title><link>https://devzone.nordicsemi.com/thread/434962?ContentTypeID=1</link><pubDate>Thu, 06 Jul 2023 12:12:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:622e21aa-b5d9-4602-a624-90eadea7623b</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;CLK and MOSI should be set as output, low, when you have placed the device in PM_DEVICE_ACTION_SUSPEND:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/v3.3.99-ncs1/drivers/pinctrl/pinctrl_nrf.c#L122C1-L140"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/v3.3.99-ncs1/drivers/pinctrl/pinctrl_nrf.c#L122C1-L140&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;MISO is input to the nRF, which&amp;#39;ll be low when your external device is powered off.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Are you seeing that the pins are high in the _SUSPEND state?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS v2.4.0: low power by example</title><link>https://devzone.nordicsemi.com/thread/434793?ContentTypeID=1</link><pubDate>Wed, 05 Jul 2023 18:15:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b82d05a3-138b-4d0d-8f2b-31a9a3928212</guid><dc:creator>pzuck</dc:creator><description>&lt;p&gt;Hi Hakon,&lt;/p&gt;
&lt;p&gt;I would need to call nrf_gpio_pin_clear() to put low also the signals CLK,MISO,MOSI. Then remove the modification I made in &amp;quot;spi_nrfx_spi.c&amp;quot;.&lt;/p&gt;
&lt;p&gt;How can I get CLK,MISO,MOSI pin numbers like what you made for CS with &amp;quot;DT_SPI_DEV_CS_GPIOS_PIN(DT_NODELABEL(spi0_cs))&amp;quot; ?&lt;/p&gt;
&lt;p&gt;thank you,&amp;nbsp;Paolo&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Immagine-2023_2D00_06_2D00_30-164756.jpg" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS v2.4.0: low power by example</title><link>https://devzone.nordicsemi.com/thread/434627?ContentTypeID=1</link><pubDate>Wed, 05 Jul 2023 08:35:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:16e0d97d-c1dd-4038-a5a4-fa6e46b4b4b4</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The idle level of /CSN is high. If you power off your external sensor, you need to set that pin low to ensure that you&amp;#39;re not back-powering your external sensor.&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s a way to set/clr the GPIO:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#include &amp;lt;hal/nrf_gpio.h&amp;gt;


...
nrf_gpio_pin_clear(DT_SPI_DEV_CS_GPIOS_PIN(DT_NODELABEL(spi0_cs)));
pm_device_action_run(spi_dev, PM_DEVICE_ACTION_SUSPEND);
...
nrf_gpio_pin_set(DT_SPI_DEV_CS_GPIOS_PIN(DT_NODELABEL(spi0_cs)));
pm_device_action_run(spi_dev, PM_DEVICE_ACTION_RESUME);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS v2.4.0: low power by example</title><link>https://devzone.nordicsemi.com/thread/434609?ContentTypeID=1</link><pubDate>Wed, 05 Jul 2023 07:57:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:365d2419-7814-4663-b20b-20661dc1a9fa</guid><dc:creator>pzuck</dc:creator><description>&lt;p&gt;Hi Hakon,&lt;/p&gt;
&lt;p&gt;In your scope screenshot I don&amp;#39;t see /CSN going low for 1 sec by the call:&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;pm_device_action_run(spi_dev, PM_DEVICE_ACTION_SUSPEND);&lt;/p&gt;
&lt;p&gt;therefore the sensor (virtual in your scenario) will never turn OFF.&lt;/p&gt;
&lt;p&gt;If everything worked we should see two times CS hi-low-hi transaction. The first very short as SPI read from sensor, the second with a duration of 1000 ms&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Let me know&lt;/p&gt;
&lt;p&gt;thank you, Paolo&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS v2.4.0: low power by example</title><link>https://devzone.nordicsemi.com/thread/434599?ContentTypeID=1</link><pubDate>Wed, 05 Jul 2023 07:30:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3798388b-0ddb-4f1f-9115-a1c9a40a4ee9</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi Paulo,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regarding the .ss_pin member: there is a difference on how the&amp;nbsp;module(s) work at boot-time vs. how they work when actually used.&lt;/p&gt;
&lt;p&gt;On boot-up, it will skip the gpio configuration, while when addressed and used in main.c, the configuration will be passed to the spi_nrfx_spi.c and be configured on each run.&lt;/p&gt;
&lt;p&gt;As the SPI hardware peripheral does not have a dedicated /CSN pin, this is handled by the gpio driver.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s the minimal main.c (based on your code):&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/*
 * Copyright (c) 2012-2014 Wind River Systems, Inc.
 *
 * SPDX-License-Identifier: Apache-2.0
 */

#include &amp;lt;zephyr/kernel.h&amp;gt;
#include &amp;lt;zephyr/logging/log.h&amp;gt;
#include &amp;lt;zephyr/drivers/gpio.h&amp;gt;
#include &amp;lt;zephyr/drivers/spi.h&amp;gt;
#include &amp;lt;zephyr/pm/device.h&amp;gt;

LOG_MODULE_REGISTER(app);

#define SPI_BUF_SIZE 16
#define MY_SPI_NODE spi0

static const struct device *spi_dev = DEVICE_DT_GET(DT_NODELABEL(MY_SPI_NODE));
static const struct spi_cs_control spi_cs_ctrl = {
	.gpio = GPIO_DT_SPEC_GET(DT_NODELABEL(MY_SPI_NODE), cs_gpios),
	.delay = 2
};

static const struct spi_config spi_cfg = {
	.frequency = 8 * 1000 * 1000,
	.operation = SPI_WORD_SET(8),
	.cs = &amp;amp;spi_cs_ctrl
};

static uint8_t tx_buf[SPI_BUF_SIZE];
static uint8_t rx_buf[SPI_BUF_SIZE];

static struct spi_buf tx_spi_bufs[] = {
	{
		.len = 4,
		.buf = tx_buf
	}
};

static struct spi_buf rx_spi_bufs[] = {
	{
		.len = 4,
		.buf = rx_buf
	}
};

static const struct spi_buf_set	spi_tx_buf_set = {
	.buffers = tx_spi_bufs,
	.count = 1
};

static const struct spi_buf_set	spi_rx_buf_set = {
	.buffers = rx_spi_bufs,
	.count = 1
};

uint8_t test_spi_read(uint8_t addr, uint8_t len)
{
	__ASSERT_NO_MSG(len &amp;lt; SPI_BUF_SIZE);

	tx_buf[0] = addr | BIT(7);

	tx_spi_bufs[0].len = rx_spi_bufs[0].len = len;

	int err = spi_transceive(spi_dev, &amp;amp;spi_cfg, &amp;amp;spi_tx_buf_set, &amp;amp;spi_rx_buf_set);
	if (err &amp;lt; 0)
	{
		LOG_WRN(&amp;quot;transceive() failed! err=%d&amp;quot;, err);
		return 1;
	} else {
		LOG_INF(&amp;quot;OK&amp;quot;);
	}
	return 0;
}

int main(void)
{
	printk(&amp;quot;Hello World! %s\n&amp;quot;, CONFIG_BOARD);
	while (1) {
		test_spi_read(0, 2);
		/* Keep it active for testing purposes */
		k_msleep(1000);
		pm_device_action_run(spi_dev, PM_DEVICE_ACTION_SUSPEND);
		k_msleep(1000);
		pm_device_action_run(spi_dev, PM_DEVICE_ACTION_RESUME);
		k_msleep(1);
	}
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s a scope of the SPI communication on &amp;amp;spi0 (P0.26/P0.27/P0.28, CSN=P0.13):&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1688541816849v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;And here&amp;#39;s the overlay that I used:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;spi0 {
        //compatible = &amp;quot;nordic,nrf-spi&amp;quot;;
        status = &amp;quot;okay&amp;quot;;
        // cs-gpios = &amp;lt;&amp;amp;gpio0 18 GPIO_ACTIVE_LOW&amp;gt;;
        cs-gpios = &amp;lt;&amp;amp;gpio0 13 GPIO_ACTIVE_LOW&amp;gt;;
        spi0_cs: spi0_cs@0 {
                reg = &amp;lt;0&amp;gt;;
        };
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;As I do not have any sensor connected on the SPI bus, there&amp;#39;s no response on MISO.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;And here&amp;#39;s the power consumption:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1688542019559v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user="pzuck"]Indeed, when I cut the power to the sensor, it remains powered from /CSN, until I set /CSN to low.[/quote]
&lt;p&gt;This is as intended. If you are powering off your external sensor, you need to ensure that all GPIOs/signals going to your external sensor are kept at GND level.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS v2.4.0: low power by example</title><link>https://devzone.nordicsemi.com/thread/434529?ContentTypeID=1</link><pubDate>Tue, 04 Jul 2023 16:34:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7e82b045-5218-4877-aa54-4a3fdd66751a</guid><dc:creator>pzuck</dc:creator><description>&lt;p&gt;Hi Hakon,&lt;/p&gt;
&lt;p&gt;What&amp;#39;s happen is clear to me as I followed the code step by step with the debugger and checked the pin states with an oscilloscope.&lt;/p&gt;
&lt;p&gt;I can confirm also that the sensor communications over SPI are OK, just I wanted to turn it OFF by using pm_device_action_run(...SUSPEND).&lt;/p&gt;
&lt;p&gt;Can&amp;#39;t understand why you don&amp;#39;t want to get the evidences reported and answer properly.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;thank you, Paolo&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS v2.4.0: low power by example</title><link>https://devzone.nordicsemi.com/thread/434349?ContentTypeID=1</link><pubDate>Tue, 04 Jul 2023 07:02:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cccac6e8-4d55-47bd-97a1-dd76fb6261e2</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>[quote user="pzuck"]Please have a look at the Zephyr sources, in particolar &amp;quot;&lt;span&gt;spi_nrfx_spi.c&amp;quot; where the field &amp;quot;skip_gpio_cfg&amp;quot; is initialized to TRUE: this initialization prevent any PIN re-configuration from&amp;nbsp;pm_device_action_run(SUSPEND).&lt;/span&gt;[/quote]
&lt;p&gt;It is setup this way on purpose, and allows the module/driver that uses it to configure it on-the-fly.&lt;/p&gt;
&lt;p&gt;I would strongly recommend that you use a logic analyzer or a oscilloscope to verify the&amp;nbsp;pin states.&lt;/p&gt;
[quote user="pzuck"]Furthermore, why the field .ss_csn is not loaded with the correct pin value ?[/quote]
&lt;p&gt;It highly likely is, just at a later point in time.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS v2.4.0: low power by example</title><link>https://devzone.nordicsemi.com/thread/434286?ContentTypeID=1</link><pubDate>Mon, 03 Jul 2023 17:03:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fd8df812-d72c-4c32-9166-c33ff68c60d2</guid><dc:creator>pzuck</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I wouldn&amp;#39;t change Zephyr code but is quite clear that without those changes the pm_device_action_run(SUSPEND) doesn&amp;#39;t handle /CSN as spi_transceive() instead does.&lt;/p&gt;
&lt;p&gt;Indeed, when I cut the power to the sensor, it remains powered from /CSN, until I set /CSN to low.&lt;/p&gt;
&lt;p&gt;Please have a look at the Zephyr sources, in particolar &amp;quot;&lt;span&gt;spi_nrfx_spi.c&amp;quot; where the field &amp;quot;skip_gpio_cfg&amp;quot; is initialized to TRUE: this initialization prevent any PIN re-configuration from&amp;nbsp;pm_device_action_run(SUSPEND).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Do you have an idea of why that hard-coded initialization ?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Furthermore, why the field .ss_csn is not loaded with the correct pin value ?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Everything seems to be strange, I&amp;#39;m worried about the possibility to have made a mistake somewhere in the configuration files.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;br /&gt;thank you, Paolo&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS v2.4.0: low power by example</title><link>https://devzone.nordicsemi.com/thread/434262?ContentTypeID=1</link><pubDate>Mon, 03 Jul 2023 14:44:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7a39fbf1-c9d8-4881-a655-decfe30d2ebe</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You are changing things you should not change now.&lt;/p&gt;
&lt;p&gt;The SPI module&amp;nbsp;handles the /CS pin on demand. Scope the SPI pins instead (or check the NRF_SPI0 register content after running).&lt;/p&gt;
[quote user="pzuck"]&lt;p&gt;&lt;/p&gt;
&lt;p&gt;doesn&amp;#39;t handle CSN pin because the field that should contain its value reports 255 (NRFX_SPI_PIN_NOT_USED).&lt;/p&gt;[/quote]
&lt;p&gt;/CSN pin only goes active when you try to send data. Please note that it is setup as active low, ie. inactive high.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="pzuck"]then turns OFF the sensor in an infinite loop.[/quote]
&lt;p&gt;Do you also cut power to the sensor? If yes, then you need to set all GPIOs that is connected to it to a low level.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS v2.4.0: low power by example</title><link>https://devzone.nordicsemi.com/thread/433976?ContentTypeID=1</link><pubDate>Fri, 30 Jun 2023 14:50:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9ef6d338-7df9-4564-b9c8-b6f17cc67d1e</guid><dc:creator>pzuck</dc:creator><description>&lt;p&gt;Forgot to notice another modify I&amp;#39;ve done in &amp;quot;spi_nrfx_spi.c&amp;quot; as follows:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Immagine-2023_2D00_06_2D00_30-164756.jpg" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS v2.4.0: low power by example</title><link>https://devzone.nordicsemi.com/thread/433970?ContentTypeID=1</link><pubDate>Fri, 30 Jun 2023 14:29:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d1e3fb8a-5834-4807-a2bb-8efd7ae1cf2e</guid><dc:creator>pzuck</dc:creator><description>&lt;p&gt;Hello Hakon,&lt;/p&gt;
&lt;p&gt;I switched to nRF52-DK to which I&amp;#39;ve manually connected the MEMS sensor over SPI and I can confirm very few microAmp when such sensor is powered OFF.&lt;/p&gt;
&lt;p&gt;In order to share something common I still working with sources from &amp;quot;blinky&amp;quot; example (pls find attached).&lt;/p&gt;
&lt;p&gt;Such example turns ON the sensor, then successfuly reads its ID, then turns OFF the sensor in an infinite loop. Unfortunately the sensor doesn&amp;#39;t turn OFF because of back-driving from CSN pin, indeed I realized that the call to:&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;pm_device_action_run(mems_spi_dev, PM_DEVICE_ACTION_SUSPEND);&lt;/p&gt;
&lt;p&gt;doesn&amp;#39;t handle CSN pin because the field that should contain its value reports 255 (NRFX_SPI_PIN_NOT_USED).&lt;/p&gt;
&lt;p&gt;CLK, MISO and MOSI are handled correctly, instead.&lt;/p&gt;
&lt;p&gt;As a proof and just to test, if I modified the zephyr original source code in &amp;quot;nrfx_spi.c&amp;quot; as follows and at last the sensor turned OFF successfully.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Immagine-2023_2D00_06_2D00_30-161417.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;Can you please help me on this ?&lt;/p&gt;
&lt;p&gt;The CSN must be initially configured as the sensor ID is read successfully, so what am I missing ?&lt;/p&gt;
&lt;p&gt;thank you very much in advance, Paolo&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;main.c&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/*
 * Copyright (c) 2016 Intel Corporation
 *
 * SPDX-License-Identifier: Apache-2.0
 */

#include &amp;lt;zephyr/kernel.h&amp;gt;
#include &amp;lt;zephyr/logging/log.h&amp;gt;
LOG_MODULE_REGISTER(app);

#include &amp;lt;zephyr/drivers/gpio.h&amp;gt;
#include &amp;lt;zephyr/drivers/spi.h&amp;gt;
#include &amp;lt;zephyr/pm/device.h&amp;gt;
#include &amp;lt;nrfx_spi.h&amp;gt;


#define OFF 					0
#define ON						1

#define LIS2DW12_WHO_AM_I	0x0F
#define LIS2DW12_CTRL2		0x21
#define LIS2DW12_ID			0x44
#define MEMS_BOOTUP_MS		(20+20)	// 20ms boot-up (rif.AN5038 pag.34)


#define SPI_NODE(idx)					DT_NODELABEL(spi##idx)
#define SPI_CS_NODE(idx)				DT_NODELABEL(spi##idx##_cs)


// MEMS
static const struct device 			*mems_spi_dev = DEVICE_DT_GET(SPI_NODE(0));
static const struct spi_cs_control	mems_spi_cs_ctrl = {
	.gpio = SPI_CS_GPIOS_DT_SPEC_GET(SPI_CS_NODE(0)),
	.delay = 2
};

static const struct spi_config 		mems_spi_cfg = {
	.frequency = 8 * 1000 * 1000,	// 8MHZ
	.operation = SPI_WORD_SET(8),
	.cs = &amp;amp;mems_spi_cs_ctrl
};

#define GPIO0_NODE						DT_NODELABEL(gpio0)
static const struct device				*gpio0_dev = DEVICE_DT_GET(GPIO0_NODE);

#define MEMS_PWR_NODE					DT_NODELABEL(mems_pwr)
static const struct gpio_dt_spec 	mems_pwr_spec =
	GPIO_DT_SPEC_GET(MEMS_PWR_NODE, gpios);


#define SPI_BUF_SIZE						256
static uint8_t								tx_buf[SPI_BUF_SIZE];
static uint8_t								rx_buf[SPI_BUF_SIZE];

static struct spi_buf 					tx_spi_bufs[] = {
	{
		.buf = tx_buf
	}
};

static struct spi_buf 					rx_spi_bufs[] = {
	{
		.buf = rx_buf
	}
};

static const struct spi_buf_set 		spi_tx_buf_set = {
	.buffers = tx_spi_bufs,
	.count = 1
};

static const struct spi_buf_set 		spi_rx_buf_set = {
	.buffers = rx_spi_bufs,
	.count = 1
};

#define TX_RX_MSG_LENGTH				256
static uint8_t								m_tx_data_spi[TX_RX_MSG_LENGTH]; ///&amp;lt; SPI TX buffer.


uint8_t mems_power(uint8_t p)
{
	if (p)
	{
		gpio_pin_configure_dt(&amp;amp;mems_pwr_spec, GPIO_OUTPUT);
		gpio_pin_set_dt(&amp;amp;mems_pwr_spec, ON);
	}
	else
	{
		// gpio_pin_configure_dt(&amp;amp;mems_pwr_spec, GPIO_INPUT);
		gpio_pin_configure_dt(&amp;amp;mems_pwr_spec, GPIO_OUTPUT);
		gpio_pin_set_dt(&amp;amp;mems_pwr_spec, OFF);
	}

	k_msleep(MEMS_BOOTUP_MS);

	return 0;	// OK
}

uint8_t mems_spi_read(uint8_t addr, void *val, uint8_t len)
{
	__ASSERT_NO_MSG(len &amp;lt; SPI_BUF_SIZE);

	tx_buf[0] = addr | BIT(7);

	tx_spi_bufs[0].len =
	rx_spi_bufs[0].len = 1+len;

	int err = spi_transceive(mems_spi_dev, &amp;amp;mems_spi_cfg,
									 &amp;amp;spi_tx_buf_set, &amp;amp;spi_rx_buf_set);
	if (err &amp;lt; 0)
	{
		LOG_WRN(&amp;quot;transceive() failed! err=%d&amp;quot;, err);
		return 1;	// KO
	}

	//LOG_HEXDUMP_DBG(rx_buf, 1+len, &amp;quot;rx&amp;quot;);
	memcpy(val, rx_buf+1, len);

	return 0;	// OK
}

void mems_check_id(void)
{
	char buf[4];

	mems_spi_read(LIS2DW12_WHO_AM_I, buf, 1);
	LOG_INF(&amp;quot;mems_check: id=x%X/x%X&amp;quot;, *buf, LIS2DW12_ID);
}

int spi_init(void)
{
	if (!device_is_ready(mems_spi_dev))
		return 1;

	return 0;
}

int main(void)
{
	while (1)
	{
		mems_power(ON);
		k_msleep(1000);

		mems_check_id();
		k_msleep(1000);

		mems_power(OFF);
		k_msleep(1000);

		pm_device_action_run(mems_spi_dev, PM_DEVICE_ACTION_SUSPEND);
		k_msleep(1000);
	}

	return 0;
}
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;board.overlay&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;// To get started, press Ctrl+Space to bring up the completion menu and view the available nodes.

// You can also use the buttons in the sidebar to perform actions on nodes.
// Actions currently available include:

// * Enabling / disabling the node
// * Adding the bus to a bus
// * Removing the node
// * Connecting ADC channels

// For more help, browse the DeviceTree documentation at https://docs.zephyrproject.org/latest/guides/dts/index.html
// You can also visit the nRF DeviceTree extension documentation at https://nrfconnect.github.io/vscode-nrf-connect/devicetree/nrfdevicetree.html

&amp;amp;sram0 {
	reg = &amp;lt;0x20000000 (DT_SIZE_K(64)-128)&amp;gt;;
};

&amp;amp;pinctrl {
	spi0_default: spi0_default {
		group1 {
			psels = &amp;lt;NRF_PSEL(SPIM_SCK, 0, 14)&amp;gt;,
				&amp;lt;NRF_PSEL(SPIM_MOSI, 0, 16)&amp;gt;,
				&amp;lt;NRF_PSEL(SPIM_MISO, 0, 15)&amp;gt;;
		};
	};

	spi0_sleep: spi0_sleep {
		group1 {
			psels = &amp;lt;NRF_PSEL(SPIM_SCK, 0, 14)&amp;gt;,
				&amp;lt;NRF_PSEL(SPIM_MOSI, 0, 16)&amp;gt;,
				&amp;lt;NRF_PSEL(SPIM_MISO, 0, 15)&amp;gt;;
			low-power-enable;
		};
	};

	spi1_default: spi1_default {
		group1 {
			psels = &amp;lt;NRF_PSEL(SPIM_SCK, 0, 7)&amp;gt;,
				&amp;lt;NRF_PSEL(SPIM_MOSI, 0, 6)&amp;gt;,
				&amp;lt;NRF_PSEL(SPIM_MISO, 0, 3)&amp;gt;;
		};
	};

	spi1_sleep: spi1_sleep {
		group1 {
			psels = &amp;lt;NRF_PSEL(SPIM_SCK, 0, 7)&amp;gt;,
				&amp;lt;NRF_PSEL(SPIM_MOSI, 0, 6)&amp;gt;,
				&amp;lt;NRF_PSEL(SPIM_MISO, 0, 3)&amp;gt;;
			low-power-enable;
		};
	};
};

&amp;amp;i2c0 {
	status = &amp;quot;disabled&amp;quot;;
};

&amp;amp;spi0 {
	//compatible = &amp;quot;nordic,nrf-spi&amp;quot;;
	status = &amp;quot;okay&amp;quot;;
	// cs-gpios = &amp;lt;&amp;amp;gpio0 18 GPIO_ACTIVE_LOW&amp;gt;;
	cs-gpios = &amp;lt;&amp;amp;gpio0 13 GPIO_ACTIVE_LOW&amp;gt;;
	spi0_cs: spi0_cs@0 {
		reg = &amp;lt;0&amp;gt;;
	};
};

&amp;amp;spi1 {
	//compatible = &amp;quot;nordic,nrf-spi&amp;quot;;
	cs-gpios = &amp;lt;&amp;amp;gpio0 2 GPIO_ACTIVE_LOW&amp;gt;;
	spi1_cs: spi1_cs@0 {
		reg = &amp;lt;0&amp;gt;;
	};
};

&amp;amp;spi2 {
	status = &amp;quot;disabled&amp;quot;;
};

&amp;amp;uart0 {
	status = &amp;quot;disabled&amp;quot;;
};

&amp;amp;arduino_serial {
	status = &amp;quot;disabled&amp;quot;;
};

&amp;amp;arduino_spi {
	status = &amp;quot;disabled&amp;quot;;
};

&amp;amp;arduino_i2c {
	status = &amp;quot;disabled&amp;quot;;
};

&amp;amp;pwm0 {
	status = &amp;quot;disabled&amp;quot;;
};

&amp;amp;led0 {
	status = &amp;quot;disabled&amp;quot;;
};

&amp;amp;led1 {
	status = &amp;quot;disabled&amp;quot;;
};

&amp;amp;led2 {
	status = &amp;quot;disabled&amp;quot;;
};

&amp;amp;led3 {
	status = &amp;quot;disabled&amp;quot;;
};

&amp;amp;pwm_led0 {
	status = &amp;quot;disabled&amp;quot;;
};

&amp;amp;button0 {
	status = &amp;quot;disabled&amp;quot;;
};

&amp;amp;button1 {
	status = &amp;quot;disabled&amp;quot;;
};

&amp;amp;button2 {
	status = &amp;quot;disabled&amp;quot;;
};

&amp;amp;button3 {
	status = &amp;quot;disabled&amp;quot;;
};

/ {
	ingressi {
		compatible = &amp;quot;gpio-keys&amp;quot;;
		button: button {
			gpios = &amp;lt;&amp;amp;gpio0 11 GPIO_ACTIVE_HIGH&amp;gt;;
		};
		mems_int: mems_int {
			gpios = &amp;lt;&amp;amp;gpio0 14 GPIO_ACTIVE_HIGH&amp;gt;;
		};
	};
};

/ {
	uscite {
		compatible = &amp;quot;gpio-leds&amp;quot;;
		led_red: led_red {
			gpios = &amp;lt;&amp;amp;gpio0 24 GPIO_ACTIVE_LOW&amp;gt;;
		};
		led_green: led_green {
			gpios = &amp;lt;&amp;amp;gpio0 22 GPIO_ACTIVE_LOW&amp;gt;;
		};
		led_blue: led_blue {
			gpios = &amp;lt;&amp;amp;gpio0 23 GPIO_ACTIVE_LOW&amp;gt;;
		};
  		mems_pwr: mems_pwr {
  			gpios = &amp;lt;&amp;amp;gpio0 12 GPIO_ACTIVE_HIGH&amp;gt;;
		};
		extm_pwr: extm_pwr {
			gpios = &amp;lt;&amp;amp;gpio0 8 GPIO_ACTIVE_LOW&amp;gt;;
		};
		extm_rst: extm_rst {
			gpios = &amp;lt;&amp;amp;gpio0 5 GPIO_ACTIVE_LOW&amp;gt;;
		};
		extm_wp: extm_wp {
			gpios = &amp;lt;&amp;amp;gpio0 4 GPIO_ACTIVE_LOW&amp;gt;;
		};
		adc_vbatt: adc_vbatt {
			gpios = &amp;lt;&amp;amp;gpio0 30 GPIO_ACTIVE_LOW&amp;gt;;
		};
	};
};

// MCU boot single slot configuration
// /delete-node/ &amp;amp;boot_partition;
// /delete-node/ &amp;amp;slot0_partition;
// /delete-node/ &amp;amp;slot1_partition;

// &amp;amp;flash0 {
// 	partitions {
// 			compatible = &amp;quot;fixed-partitions&amp;quot;;
// 			#address-cells = &amp;lt;1&amp;gt;;
// 			#size-cells = &amp;lt;1&amp;gt;;

// 			boot_partition: partition@0 {
// 				label = &amp;quot;mcuboot&amp;quot;;
// 				reg = &amp;lt;0x000000000 0x0000c000&amp;gt;;
// 			};
// 			slot0_partition: partition@c000 {
// 				label = &amp;quot;image-0&amp;quot;;
// 				reg = &amp;lt;0x00000c000 0x00006e000&amp;gt;;
// 			};
// 	};
// };
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;board.dts&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/*
 * Copyright (c) 2017 Shawn Nock &amp;lt;shawn@monadnock.ca&amp;gt;
 * Copyright (c) 2017 Linaro Limited
 *
 * SPDX-License-Identifier: Apache-2.0
 */

/dts-v1/;
#include &amp;lt;nordic/nrf52832_qfaa.dtsi&amp;gt;
#include &amp;quot;nrf52dk_nrf52832-pinctrl.dtsi&amp;quot;

/ {
	model = &amp;quot;Nordic nRF52 DK NRF52832&amp;quot;;
	compatible = &amp;quot;nordic,nrf52-dk-nrf52832&amp;quot;;

	chosen {
		zephyr,console = &amp;amp;uart0;
		zephyr,shell-uart = &amp;amp;uart0;
		zephyr,uart-mcumgr = &amp;amp;uart0;
		zephyr,bt-mon-uart = &amp;amp;uart0;
		zephyr,bt-c2h-uart = &amp;amp;uart0;
		zephyr,sram = &amp;amp;sram0;
		zephyr,flash = &amp;amp;flash0;
		zephyr,code-partition = &amp;amp;slot0_partition;
	};

	leds {
		compatible = &amp;quot;gpio-leds&amp;quot;;
		led0: led_0 {
			gpios = &amp;lt;&amp;amp;gpio0 17 GPIO_ACTIVE_LOW&amp;gt;;
			label = &amp;quot;Green LED 0&amp;quot;;
		};
		led1: led_1 {
			gpios = &amp;lt;&amp;amp;gpio0 18 GPIO_ACTIVE_LOW&amp;gt;;
			label = &amp;quot;Green LED 1&amp;quot;;
		};
		led2: led_2 {
			gpios = &amp;lt;&amp;amp;gpio0 19 GPIO_ACTIVE_LOW&amp;gt;;
			label = &amp;quot;Green LED 2&amp;quot;;
		};
		led3: led_3 {
			gpios = &amp;lt;&amp;amp;gpio0 20 GPIO_ACTIVE_LOW&amp;gt;;
			label = &amp;quot;Green LED 3&amp;quot;;
		};
	};

	pwmleds {
		compatible = &amp;quot;pwm-leds&amp;quot;;
		pwm_led0: pwm_led_0 {
			pwms = &amp;lt;&amp;amp;pwm0 0 PWM_MSEC(20) PWM_POLARITY_INVERTED&amp;gt;;
		};
	};

	buttons {
		compatible = &amp;quot;gpio-keys&amp;quot;;
		button0: button_0 {
			gpios = &amp;lt;&amp;amp;gpio0 13 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)&amp;gt;;
			label = &amp;quot;Push button switch 0&amp;quot;;
		};
		button1: button_1 {
			gpios = &amp;lt;&amp;amp;gpio0 14 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)&amp;gt;;
			label = &amp;quot;Push button switch 1&amp;quot;;
		};
		button2: button_2 {
			gpios = &amp;lt;&amp;amp;gpio0 15 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)&amp;gt;;
			label = &amp;quot;Push button switch 2&amp;quot;;
		};
		button3: button_3 {
			gpios = &amp;lt;&amp;amp;gpio0 16 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)&amp;gt;;
			label = &amp;quot;Push button switch 3&amp;quot;;
		};
	};

	arduino_header: connector {
		compatible = &amp;quot;arduino-header-r3&amp;quot;;
		#gpio-cells = &amp;lt;2&amp;gt;;
		gpio-map-mask = &amp;lt;0xffffffff 0xffffffc0&amp;gt;;
		gpio-map-pass-thru = &amp;lt;0 0x3f&amp;gt;;
		gpio-map = &amp;lt;0 0 &amp;amp;gpio0 3 0&amp;gt;,	/* A0 */
			   &amp;lt;1 0 &amp;amp;gpio0 4 0&amp;gt;,	/* A1 */
			   &amp;lt;2 0 &amp;amp;gpio0 28 0&amp;gt;,	/* A2 */
			   &amp;lt;3 0 &amp;amp;gpio0 29 0&amp;gt;,	/* A3 */
			   &amp;lt;4 0 &amp;amp;gpio0 30 0&amp;gt;,	/* A4 */
			   &amp;lt;5 0 &amp;amp;gpio0 31 0&amp;gt;,	/* A5 */
			   &amp;lt;6 0 &amp;amp;gpio0 11 0&amp;gt;,	/* D0 */
			   &amp;lt;7 0 &amp;amp;gpio0 12 0&amp;gt;,	/* D1 */
			   &amp;lt;8 0 &amp;amp;gpio0 13 0&amp;gt;,	/* D2 */
			   &amp;lt;9 0 &amp;amp;gpio0 14 0&amp;gt;,	/* D3 */
			   &amp;lt;10 0 &amp;amp;gpio0 15 0&amp;gt;,	/* D4 */
			   &amp;lt;11 0 &amp;amp;gpio0 16 0&amp;gt;,	/* D5 */
			   &amp;lt;12 0 &amp;amp;gpio0 17 0&amp;gt;,	/* D6 */
			   &amp;lt;13 0 &amp;amp;gpio0 18 0&amp;gt;,	/* D7 */
			   &amp;lt;14 0 &amp;amp;gpio0 19 0&amp;gt;,	/* D8 */
			   &amp;lt;15 0 &amp;amp;gpio0 20 0&amp;gt;,	/* D9 */
			   &amp;lt;16 0 &amp;amp;gpio0 22 0&amp;gt;,	/* D10 */
			   &amp;lt;17 0 &amp;amp;gpio0 23 0&amp;gt;,	/* D11 */
			   &amp;lt;18 0 &amp;amp;gpio0 24 0&amp;gt;,	/* D12 */
			   &amp;lt;19 0 &amp;amp;gpio0 25 0&amp;gt;,	/* D13 */
			   &amp;lt;20 0 &amp;amp;gpio0 26 0&amp;gt;,	/* D14 */
			   &amp;lt;21 0 &amp;amp;gpio0 27 0&amp;gt;;	/* D15 */
	};

	arduino_adc: analog-connector {
		compatible = &amp;quot;arduino,uno-adc&amp;quot;;
		#io-channel-cells = &amp;lt;1&amp;gt;;
		io-channel-map = &amp;lt;0 &amp;amp;adc 1&amp;gt;,	/* A0 = P0.3 = AIN1 */
				 &amp;lt;1 &amp;amp;adc 2&amp;gt;,	/* A1 = P0.4 = AIN2 */
				 &amp;lt;2 &amp;amp;adc 4&amp;gt;,	/* A2 = P0.28 = AIN4 */
				 &amp;lt;3 &amp;amp;adc 5&amp;gt;,	/* A3 = P0.29 = AIN5 */
				 &amp;lt;4 &amp;amp;adc 6&amp;gt;,	/* A4 = P0.30 = AIN6 */
				 &amp;lt;5 &amp;amp;adc 7&amp;gt;;	/* A5 = P0.31 = AIN7 */
	};

	/* These aliases are provided for compatibility with samples */
	aliases {
		led0 = &amp;amp;led0;
		led1 = &amp;amp;led1;
		led2 = &amp;amp;led2;
		led3 = &amp;amp;led3;
		pwm-led0 = &amp;amp;pwm_led0;
		sw0 = &amp;amp;button0;
		sw1 = &amp;amp;button1;
		sw2 = &amp;amp;button2;
		sw3 = &amp;amp;button3;
		bootloader-led0 = &amp;amp;led0;
		mcuboot-button0 = &amp;amp;button0;
		mcuboot-led0 = &amp;amp;led0;
		watchdog0 = &amp;amp;wdt0;
	};
};

&amp;amp;adc {
	status = &amp;quot;okay&amp;quot;;
};

&amp;amp;gpiote {
	status = &amp;quot;okay&amp;quot;;
};

&amp;amp;gpio0 {
	status = &amp;quot;okay&amp;quot;;
};

arduino_serial: &amp;amp;uart0 {
	status = &amp;quot;okay&amp;quot;;
	compatible = &amp;quot;nordic,nrf-uarte&amp;quot;;
	current-speed = &amp;lt;115200&amp;gt;;
	pinctrl-0 = &amp;lt;&amp;amp;uart0_default&amp;gt;;
	pinctrl-1 = &amp;lt;&amp;amp;uart0_sleep&amp;gt;;
	pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;
};

arduino_i2c: &amp;amp;i2c0 {
	compatible = &amp;quot;nordic,nrf-twi&amp;quot;;
	status = &amp;quot;okay&amp;quot;;
	pinctrl-0 = &amp;lt;&amp;amp;i2c0_default&amp;gt;;
	pinctrl-1 = &amp;lt;&amp;amp;i2c0_sleep&amp;gt;;
	pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;
};

&amp;amp;i2c1 {
	compatible = &amp;quot;nordic,nrf-twi&amp;quot;;
	/* Cannot be used together with spi1. */
	/* status = &amp;quot;okay&amp;quot;; */
	pinctrl-0 = &amp;lt;&amp;amp;i2c1_default&amp;gt;;
	pinctrl-1 = &amp;lt;&amp;amp;i2c1_sleep&amp;gt;;
	pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;
};

&amp;amp;pwm0 {
	status = &amp;quot;okay&amp;quot;;
	pinctrl-0 = &amp;lt;&amp;amp;pwm0_default&amp;gt;;
	pinctrl-1 = &amp;lt;&amp;amp;pwm0_sleep&amp;gt;;
	pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;
};

&amp;amp;spi0 {
	compatible = &amp;quot;nordic,nrf-spi&amp;quot;;
	/* Cannot be used together with i2c0. */
	/* status = &amp;quot;okay&amp;quot;; */
	pinctrl-0 = &amp;lt;&amp;amp;spi0_default&amp;gt;;
	pinctrl-1 = &amp;lt;&amp;amp;spi0_sleep&amp;gt;;
	pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;
};

&amp;amp;spi1 {
	compatible = &amp;quot;nordic,nrf-spi&amp;quot;;
	status = &amp;quot;okay&amp;quot;;
	pinctrl-0 = &amp;lt;&amp;amp;spi1_default&amp;gt;;
	pinctrl-1 = &amp;lt;&amp;amp;spi1_sleep&amp;gt;;
	pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;
};

arduino_spi: &amp;amp;spi2 {
	compatible = &amp;quot;nordic,nrf-spi&amp;quot;;
	status = &amp;quot;okay&amp;quot;;
	cs-gpios = &amp;lt;&amp;amp;arduino_header 16 GPIO_ACTIVE_LOW&amp;gt;; /* D10 */
	pinctrl-0 = &amp;lt;&amp;amp;spi2_default&amp;gt;;
	pinctrl-1 = &amp;lt;&amp;amp;spi2_sleep&amp;gt;;
	pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;
};

&amp;amp;flash0 {

	partitions {
		compatible = &amp;quot;fixed-partitions&amp;quot;;
		#address-cells = &amp;lt;1&amp;gt;;
		#size-cells = &amp;lt;1&amp;gt;;

		boot_partition: partition@0 {
			label = &amp;quot;mcuboot&amp;quot;;
			reg = &amp;lt;0x00000000 0xc000&amp;gt;;
		};
		slot0_partition: partition@c000 {
			label = &amp;quot;image-0&amp;quot;;
			reg = &amp;lt;0x0000C000 0x37000&amp;gt;;
		};
		slot1_partition: partition@43000 {
			label = &amp;quot;image-1&amp;quot;;
			reg = &amp;lt;0x00043000 0x37000&amp;gt;;
		};
		storage_partition: partition@7a000 {
			label = &amp;quot;storage&amp;quot;;
			reg = &amp;lt;0x0007a000 0x00006000&amp;gt;;
		};
	};
};
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;prj.conf&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_GPIO=y
CONFIG_SPI=y
CONFIG_ASSERT=y
CONFIG_LOG=y
CONFIG_PM=y
CONFIG_PM_DEVICE=y
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS v2.4.0: low power by example</title><link>https://devzone.nordicsemi.com/thread/432886?ContentTypeID=1</link><pubDate>Mon, 26 Jun 2023 09:08:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:11804f15-02de-4edd-a37a-7b8469038412</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi Paolo,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Sorry for the late reply.&lt;/p&gt;
&lt;p&gt;Due to this errata on nRF52832:&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/errata_nRF52832_Rev3/ERR/nRF52832/Rev3/latest/anomaly_832_58.html#anomaly_832_58"&gt;https://infocenter.nordicsemi.com/topic/errata_nRF52832_Rev3/ERR/nRF52832/Rev3/latest/anomaly_832_58.html#anomaly_832_58&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You must select the configuration: CONFIG_SOC_NRF52832_ALLOW_SPIM_DESPITE_PAN_58=y&lt;/p&gt;
&lt;p&gt;You might also need to set: CONFIG_NRFX_PPI=y&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please note that this restriction should only be applied if you are certain that you will not trigger the above mentioned anomaly.&lt;/p&gt;
&lt;p&gt;This can also explain why you&amp;#39;re not seeing a higher current consumption when selecting &amp;quot;nordic,nrf-spim&amp;quot;; as the above kconfig was blocking you from enabling the SPIx instances.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Even with all of these set at my end (regardless of nrf,spi or nrf,spim used), I still see &amp;lt; 10 uA sleep with your project.&lt;/p&gt;
&lt;p&gt;You need to check if the additional current goes into your external flash.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS v2.4.0: low power by example</title><link>https://devzone.nordicsemi.com/thread/432742?ContentTypeID=1</link><pubDate>Fri, 23 Jun 2023 15:13:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4e512599-96fb-44ae-91cc-361bff2e10e2</guid><dc:creator>pzuck</dc:creator><description>&lt;p&gt;Hi Hakon,&lt;/p&gt;
&lt;p&gt;Pls confirm if you managed to build without errors, I&amp;#39;m stuck on this point since long time...&lt;/p&gt;
&lt;p&gt;thank you, Paolo&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS v2.4.0: low power by example</title><link>https://devzone.nordicsemi.com/thread/432694?ContentTypeID=1</link><pubDate>Fri, 23 Jun 2023 12:33:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:58152fd8-14a4-4551-b735-67976f4195f5</guid><dc:creator>pzuck</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The error persists even if I delete &amp;quot;build&amp;quot; folder. Any other hints ?&lt;/p&gt;
&lt;p&gt;As I&amp;#39;m a newbie in Zephyr it would be more effective to figure out the difference between spi &amp;amp; spim in the compatible item...&lt;/p&gt;
&lt;p&gt;regard, Paolo&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS v2.4.0: low power by example</title><link>https://devzone.nordicsemi.com/thread/432676?ContentTypeID=1</link><pubDate>Fri, 23 Jun 2023 11:56:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b135d5cd-d870-4d31-866f-475c17301075</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Try deleting your build-folder for each time that you change the &amp;quot;compatible&amp;quot; line in the overlay file.&amp;nbsp;&lt;/p&gt;
[quote user="pzuck"]I assume that when all related I/O pins are set to HI-Z it shouldn&amp;#39;t be backdriven, anyway just to try I&amp;#39;ve uncommented the line below for &amp;amp;spi0 and &amp;amp;spi1:[/quote]
&lt;p&gt;You have to set the CSN inactive to avoid added consumption from any external IC. If it floats, it can draw excessive current.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS v2.4.0: low power by example</title><link>https://devzone.nordicsemi.com/thread/432648?ContentTypeID=1</link><pubDate>Fri, 23 Jun 2023 09:53:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5551d0bf-f669-4444-9fe4-1b754c474f96</guid><dc:creator>pzuck</dc:creator><description>&lt;p&gt;Hi All,&lt;/p&gt;
&lt;p&gt;Trying to make some steps ahead I began to evolve blinky project by initializing some structures aiming to exchange some basic data but unfortunately I got the following error from linker:&lt;/p&gt;
&lt;p&gt;d:/programmi/ncs/toolchains/31f4403e35/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe: app/libapp.a(main.c.obj): in function `spi_init&amp;#39;:&lt;br /&gt;D:\Project\blinky\src\main.c:74: undefined reference to `__device_dts_ord_78&amp;#39;&lt;br /&gt;collect2.exe: error: ld returned 1 exit status&lt;/p&gt;
&lt;p&gt;That error arises only when: c&lt;span&gt;ompatible&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&amp;quot;nordic,nrf-spim&amp;quot;&lt;/span&gt;&lt;span&gt;; if I replace with:&amp;nbsp;&lt;/span&gt;&lt;span&gt;compatible&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&amp;quot;nordic,nrf-spi&amp;quot;&lt;/span&gt;&lt;span&gt;&amp;nbsp;the error disappears and the build completes successfully.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Anyone can tell me what&amp;#39;s missing ?&lt;/p&gt;
&lt;p&gt;thank you in advance, Paolo&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;main.c&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/*
 * Copyright (c) 2016 Intel Corporation
 *
 * SPDX-License-Identifier: Apache-2.0
 */

#include &amp;lt;zephyr/kernel.h&amp;gt;
#include &amp;lt;zephyr/drivers/gpio.h&amp;gt;
#include &amp;lt;zephyr/drivers/spi.h&amp;gt;

/* 1000 msec = 1 sec */
#define SLEEP_TIME_MS   1000

/* The devicetree node identifier for the &amp;quot;led0&amp;quot; alias. */
#define LED0_NODE DT_NODELABEL(led_red)

/*
 * A build error on this line means your board is unsupported.
 * See the sample documentation for information on how to fix this.
 */
static const struct gpio_dt_spec led = GPIO_DT_SPEC_GET(LED0_NODE, gpios);



// MEMS
#define MEMS_SPI_NODE			DT_NODELABEL(spi0)
static const struct device 	*mems_spi_dev = DEVICE_DT_GET(MEMS_SPI_NODE);

#define MEMS_SPI_CS_NODE		DT_NODELABEL(spi0_cs)
static const struct spi_cs_control mems_spi_cs_ctrl = {
	.gpio = SPI_CS_GPIOS_DT_SPEC_GET(MEMS_SPI_CS_NODE),
	.delay = 2
};

static const struct spi_config mems_spi_cfg = {
	.frequency = 8000000,	// 8MHZ
	.operation = SPI_WORD_SET(8),
	.cs = &amp;amp;mems_spi_cs_ctrl
};

#define	SPI_BUF_SIZE	256
static uint8_t tx_buf[SPI_BUF_SIZE];
static uint8_t rx_buf[SPI_BUF_SIZE];

static struct spi_buf tx_spi_bufs[] = {
	{
		.buf = tx_buf
	}
};

static struct spi_buf rx_spi_bufs[] = {
	{
		.buf = rx_buf
	}
};

static const struct spi_buf_set spi_tx_buf_set = {
	.buffers = tx_spi_bufs,
	.count = 1
};

static const struct spi_buf_set spi_rx_buf_set = {
	.buffers = rx_spi_bufs,
	.count = 1
};


int spi_init(void)
{
	if (!device_is_ready(mems_spi_dev))
		return 1;

	return 0;	// OK
}


int main(void)
{
	if (!gpio_is_ready_dt(&amp;amp;led))
	{
		return 0;
	}

	int ret = gpio_pin_configure_dt(&amp;amp;led, GPIO_OUTPUT_ACTIVE);
	if (ret &amp;lt; 0)
		return 0;

	spi_init();

	while (1) 
	{
		ret = gpio_pin_toggle_dt(&amp;amp;led);
		if (ret &amp;lt; 0)
			return 0;
		
		k_msleep(SLEEP_TIME_MS);
	}
	
	return 0;
}
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;board.dts&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/*
 * Copyright (c) 2017 Shawn Nock &amp;lt;shawn@monadnock.ca&amp;gt;
 * Copyright (c) 2017 Linaro Limited
 *
 * SPDX-License-Identifier: Apache-2.0
 */

/dts-v1/;
#include &amp;lt;nordic/nrf52832_qfaa.dtsi&amp;gt;
#include &amp;quot;nrf52dk_nrf52832-pinctrl.dtsi&amp;quot;

/ {
	model = &amp;quot;Nordic nRF52 DK NRF52832&amp;quot;;
	compatible = &amp;quot;nordic,nrf52-dk-nrf52832&amp;quot;;

	chosen {
		zephyr,console = &amp;amp;uart0;
		zephyr,shell-uart = &amp;amp;uart0;
		zephyr,uart-mcumgr = &amp;amp;uart0;
		zephyr,bt-mon-uart = &amp;amp;uart0;
		zephyr,bt-c2h-uart = &amp;amp;uart0;
		zephyr,sram = &amp;amp;sram0;
		zephyr,flash = &amp;amp;flash0;
		zephyr,code-partition = &amp;amp;slot0_partition;
	};

	/* These aliases are provided for compatibility with samples */
	aliases {
		// led0 = &amp;amp;led0;
		// led1 = &amp;amp;led1;
		// led2 = &amp;amp;led2;
		// led3 = &amp;amp;led3;
		// pwm-led0 = &amp;amp;pwm_led0;
		// sw0 = &amp;amp;button0;
		// sw1 = &amp;amp;button1;
		// sw2 = &amp;amp;button2;
		// sw3 = &amp;amp;button3;
		// bootloader-led0 = &amp;amp;led0;
		// mcuboot-button0 = &amp;amp;button0;
		// mcuboot-led0 = &amp;amp;led0;
		watchdog0 = &amp;amp;wdt0;
	};
};

&amp;amp;adc {
	status = &amp;quot;okay&amp;quot;;
};

&amp;amp;gpiote {
	status = &amp;quot;okay&amp;quot;;
};

&amp;amp;gpio0 {
	status = &amp;quot;okay&amp;quot;;
};

&amp;amp;pinctrl {
	uart0_default: uart0_default {
		group1 {
			psels = &amp;lt;NRF_PSEL(UART_TX, 0, 20)&amp;gt;,
				&amp;lt;NRF_PSEL(UART_RX, 0, 19)&amp;gt;;
		};
	};

	uart0_sleep: uart0_sleep {
		group1 {
			psels = &amp;lt;NRF_PSEL(UART_TX, 0, 20)&amp;gt;,
				&amp;lt;NRF_PSEL(UART_RX, 0, 19)&amp;gt;;
			low-power-enable;
		};
	};

	spi0_default: spi0_default {
		group1 {
			psels = &amp;lt;NRF_PSEL(SPIM_SCK, 0, 17)&amp;gt;,
				&amp;lt;NRF_PSEL(SPIM_MOSI, 0, 16)&amp;gt;,
				&amp;lt;NRF_PSEL(SPIM_MISO, 0, 15)&amp;gt;;
		};
	};

	spi0_sleep: spi0_sleep {
		group1 {
			psels = &amp;lt;NRF_PSEL(SPIM_SCK, 0, 17)&amp;gt;,
				&amp;lt;NRF_PSEL(SPIM_MOSI, 0, 16)&amp;gt;,
				&amp;lt;NRF_PSEL(SPIM_MISO, 0, 15)&amp;gt;;
			low-power-enable;
		};
	};

	spi1_default: spi1_default {
		group1 {
			psels = &amp;lt;NRF_PSEL(SPIM_SCK, 0, 7)&amp;gt;,
				&amp;lt;NRF_PSEL(SPIM_MOSI, 0, 6)&amp;gt;,
				&amp;lt;NRF_PSEL(SPIM_MISO, 0, 3)&amp;gt;;
		};
	};

	spi1_sleep: spi1_sleep {
		group1 {
			psels = &amp;lt;NRF_PSEL(SPIM_SCK, 0, 7)&amp;gt;,
				&amp;lt;NRF_PSEL(SPIM_MOSI, 0, 6)&amp;gt;,
				&amp;lt;NRF_PSEL(SPIM_MISO, 0, 3)&amp;gt;;
			low-power-enable;
		};
	};
};

&amp;amp;uart0 {
	status = &amp;quot;okay&amp;quot;;
	compatible = &amp;quot;nordic,nrf-uarte&amp;quot;;
	current-speed = &amp;lt;115200&amp;gt;;
	pinctrl-0 = &amp;lt;&amp;amp;uart0_default&amp;gt;;
	pinctrl-1 = &amp;lt;&amp;amp;uart0_sleep&amp;gt;;
	pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;
};

&amp;amp;spi0 {
	compatible = &amp;quot;nordic,nrf-spim&amp;quot;;
	status = &amp;quot;okay&amp;quot;;
	pinctrl-0 = &amp;lt;&amp;amp;spi0_default&amp;gt;;
	pinctrl-1 = &amp;lt;&amp;amp;spi0_sleep&amp;gt;;
	pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;
	cs-gpios = &amp;lt;&amp;amp;gpio0 18 GPIO_ACTIVE_LOW&amp;gt;;
	spi0_cs: spi0_cs@0 {
		reg = &amp;lt;0&amp;gt;;
	};
};
	
&amp;amp;spi1 {
	compatible = &amp;quot;nordic,nrf-spim&amp;quot;;
	status = &amp;quot;okay&amp;quot;;
	pinctrl-0 = &amp;lt;&amp;amp;spi1_default&amp;gt;;
	pinctrl-1 = &amp;lt;&amp;amp;spi1_sleep&amp;gt;;
	pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;
 	cs-gpios = &amp;lt;&amp;amp;gpio0 2 GPIO_ACTIVE_LOW&amp;gt;;
 	spi1_cs: spi1_cs@0 {
 		reg = &amp;lt;0&amp;gt;;
 	};
};

&amp;amp;flash0 {

	partitions {
		compatible = &amp;quot;fixed-partitions&amp;quot;;
		#address-cells = &amp;lt;1&amp;gt;;
		#size-cells = &amp;lt;1&amp;gt;;

		boot_partition: partition@0 {
			label = &amp;quot;mcuboot&amp;quot;;
			reg = &amp;lt;0x00000000 0xc000&amp;gt;;
		};
		slot0_partition: partition@c000 {
			label = &amp;quot;image-0&amp;quot;;
			reg = &amp;lt;0x0000C000 0x37000&amp;gt;;
		};
		slot1_partition: partition@43000 {
			label = &amp;quot;image-1&amp;quot;;
			reg = &amp;lt;0x00043000 0x37000&amp;gt;;
		};
		storage_partition: partition@7a000 {
			label = &amp;quot;storage&amp;quot;;
			reg = &amp;lt;0x0007a000 0x00006000&amp;gt;;
		};
	};
};
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;board.overlay&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/ {
	outputs {
		compatible = &amp;quot;gpio-leds&amp;quot;;
		led_red: led_red {
			gpios = &amp;lt;&amp;amp;gpio0 24 GPIO_ACTIVE_LOW&amp;gt;;
		};
	};
};
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;prj.conf&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_GPIO=y
CONFIG_SPI=y
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS v2.4.0: low power by example</title><link>https://devzone.nordicsemi.com/thread/432549?ContentTypeID=1</link><pubDate>Thu, 22 Jun 2023 13:44:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4f3929dc-48fb-4322-97af-253366eac920</guid><dc:creator>pzuck</dc:creator><description>&lt;p&gt;Hi Hakon,&lt;/p&gt;
&lt;p&gt;Yes, there is an external SPI flash but I assume that when all related I/O pins are set to HI-Z it shouldn&amp;#39;t be backdriven, anyway just to try I&amp;#39;ve uncommented the line below for &amp;amp;spi0 and &amp;amp;spi1:&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;compatible&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&amp;quot;nordic,nrf-spim&amp;quot;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;And magically the extra-current disappeared !!!!&amp;nbsp;&lt;/span&gt;&lt;span&gt;How do you explain this?&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;thank you,&amp;nbsp;&lt;/span&gt;&lt;span&gt;Paolo&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;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;//&amp;nbsp;&lt;/span&gt;&lt;span&gt;compatible&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&amp;quot;nordic,nrf-spim&amp;quot;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/wave5.png" /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;compatible&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;quot;nordic,nrf-spim&amp;quot;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/wave6.png" /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;tag.dts&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/*
 * Copyright (c) 2017 Shawn Nock &amp;lt;shawn@monadnock.ca&amp;gt;
 * Copyright (c) 2017 Linaro Limited
 *
 * SPDX-License-Identifier: Apache-2.0
 */

/dts-v1/;
#include &amp;lt;nordic/nrf52832_qfaa.dtsi&amp;gt;
#include &amp;quot;nrf52dk_nrf52832-pinctrl.dtsi&amp;quot;

/ {
	model = &amp;quot;Nordic nRF52 DK NRF52832&amp;quot;;
	compatible = &amp;quot;nordic,nrf52-dk-nrf52832&amp;quot;;

	chosen {
		zephyr,console = &amp;amp;uart0;
		zephyr,shell-uart = &amp;amp;uart0;
		zephyr,uart-mcumgr = &amp;amp;uart0;
		zephyr,bt-mon-uart = &amp;amp;uart0;
		zephyr,bt-c2h-uart = &amp;amp;uart0;
		zephyr,sram = &amp;amp;sram0;
		zephyr,flash = &amp;amp;flash0;
		zephyr,code-partition = &amp;amp;slot0_partition;
	};

	/* These aliases are provided for compatibility with samples */
	aliases {
		// led0 = &amp;amp;led0;
		// led1 = &amp;amp;led1;
		// led2 = &amp;amp;led2;
		// led3 = &amp;amp;led3;
		// pwm-led0 = &amp;amp;pwm_led0;
		// sw0 = &amp;amp;button0;
		// sw1 = &amp;amp;button1;
		// sw2 = &amp;amp;button2;
		// sw3 = &amp;amp;button3;
		// bootloader-led0 = &amp;amp;led0;
		// mcuboot-button0 = &amp;amp;button0;
		// mcuboot-led0 = &amp;amp;led0;
		watchdog0 = &amp;amp;wdt0;
	};
};

&amp;amp;adc {
	status = &amp;quot;okay&amp;quot;;
};

&amp;amp;gpiote {
	status = &amp;quot;okay&amp;quot;;
};

&amp;amp;gpio0 {
	status = &amp;quot;okay&amp;quot;;
};

&amp;amp;uart0 {
	status = &amp;quot;okay&amp;quot;;
	compatible = &amp;quot;nordic,nrf-uarte&amp;quot;;
	current-speed = &amp;lt;115200&amp;gt;;
	pinctrl-0 = &amp;lt;&amp;amp;uart0_default&amp;gt;;
	pinctrl-1 = &amp;lt;&amp;amp;uart0_sleep&amp;gt;;
	pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;
};

&amp;amp;pinctrl {
	uart0_default: uart0_default {
		group1 {
			psels = &amp;lt;NRF_PSEL(UART_TX, 0, 20)&amp;gt;,
				&amp;lt;NRF_PSEL(UART_RX, 0, 19)&amp;gt;;
		};
	};

	uart0_sleep: uart0_sleep {
		group1 {
			psels = &amp;lt;NRF_PSEL(UART_TX, 0, 20)&amp;gt;,
				&amp;lt;NRF_PSEL(UART_RX, 0, 19)&amp;gt;;
			low-power-enable;
		};
	};

	spi0_default: spi0_default {
		group1 {
			psels = &amp;lt;NRF_PSEL(SPIM_SCK, 0, 17)&amp;gt;,
				&amp;lt;NRF_PSEL(SPIM_MOSI, 0, 16)&amp;gt;,
				&amp;lt;NRF_PSEL(SPIM_MISO, 0, 15)&amp;gt;;
		};
	};

	spi0_sleep: spi0_sleep {
		group1 {
			psels = &amp;lt;NRF_PSEL(SPIM_SCK, 0, 17)&amp;gt;,
				&amp;lt;NRF_PSEL(SPIM_MOSI, 0, 16)&amp;gt;,
				&amp;lt;NRF_PSEL(SPIM_MISO, 0, 15)&amp;gt;;
			low-power-enable;
		};
	};

	spi1_default: spi1_default {
		group1 {
			psels = &amp;lt;NRF_PSEL(SPIM_SCK, 0, 7)&amp;gt;,
				&amp;lt;NRF_PSEL(SPIM_MOSI, 0, 6)&amp;gt;,
				&amp;lt;NRF_PSEL(SPIM_MISO, 0, 3)&amp;gt;;
		};
	};

	spi1_sleep: spi1_sleep {
		group1 {
			psels = &amp;lt;NRF_PSEL(SPIM_SCK, 0, 7)&amp;gt;,
				&amp;lt;NRF_PSEL(SPIM_MOSI, 0, 6)&amp;gt;,
				&amp;lt;NRF_PSEL(SPIM_MISO, 0, 3)&amp;gt;;
			low-power-enable;
		};
	};
};

&amp;amp;spi0 {
	compatible = &amp;quot;nordic,nrf-spim&amp;quot;;
	status = &amp;quot;okay&amp;quot;;
	pinctrl-0 = &amp;lt;&amp;amp;spi0_default&amp;gt;;
	pinctrl-1 = &amp;lt;&amp;amp;spi0_sleep&amp;gt;;
	pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;
	cs-gpios = &amp;lt;&amp;amp;gpio0 18 GPIO_ACTIVE_LOW&amp;gt;;
	spi0_cs: spi0_cs@0 {
		reg = &amp;lt;0&amp;gt;;
	};
};
	
&amp;amp;spi1 {
	compatible = &amp;quot;nordic,nrf-spim&amp;quot;;
	status = &amp;quot;okay&amp;quot;;
	pinctrl-0 = &amp;lt;&amp;amp;spi1_default&amp;gt;;
	pinctrl-1 = &amp;lt;&amp;amp;spi1_sleep&amp;gt;;
	pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;
 	cs-gpios = &amp;lt;&amp;amp;gpio0 2 GPIO_ACTIVE_LOW&amp;gt;;
 	spi1_cs: spi1_cs@0 {
 		reg = &amp;lt;0&amp;gt;;
 	};
};

&amp;amp;flash0 {

	partitions {
		compatible = &amp;quot;fixed-partitions&amp;quot;;
		#address-cells = &amp;lt;1&amp;gt;;
		#size-cells = &amp;lt;1&amp;gt;;

		boot_partition: partition@0 {
			label = &amp;quot;mcuboot&amp;quot;;
			reg = &amp;lt;0x00000000 0xc000&amp;gt;;
		};
		slot0_partition: partition@c000 {
			label = &amp;quot;image-0&amp;quot;;
			reg = &amp;lt;0x0000C000 0x37000&amp;gt;;
		};
		slot1_partition: partition@43000 {
			label = &amp;quot;image-1&amp;quot;;
			reg = &amp;lt;0x00043000 0x37000&amp;gt;;
		};
		storage_partition: partition@7a000 {
			label = &amp;quot;storage&amp;quot;;
			reg = &amp;lt;0x0007a000 0x00006000&amp;gt;;
		};
	};
};
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>