<?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>Unable to pull SPI MISO line down via device tree configuration</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/113908/unable-to-pull-spi-miso-line-down-via-device-tree-configuration</link><description>We have an nRF52833-based board, software is based on Zephyr and Nordic SDK 2.1.2. One of the SPI interfaces connected to external flash (Winbond W25Q80DVSNIG) Board is battery powered, so power draw is an issue. While debugging board&amp;#39;s excessive power</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 15 Aug 2024 10:07:36 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/113908/unable-to-pull-spi-miso-line-down-via-device-tree-configuration" /><item><title>RE: Unable to pull SPI MISO line down via device tree configuration</title><link>https://devzone.nordicsemi.com/thread/498423?ContentTypeID=1</link><pubDate>Thu, 15 Aug 2024 10:07:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2a5e0059-41d0-4789-bddf-ba72a50802a8</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Alex,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m glad to hear that it worked, thanks for the update. Forgot to add earlier that there is a Kconfig setting (&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/98a344fe21a4439b0cd1d340635a6ccb3e166f46/drivers/flash/Kconfig.nor#L34"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/98a344fe21a4439b0cd1d340635a6ccb3e166f46/drivers/flash/Kconfig.nor#L34&lt;/a&gt;) to make the driver automatically issue the power down &lt;span&gt;(0xB9)&lt;/span&gt;&amp;nbsp;command between SPI transactions, in case you&amp;nbsp;had not seen it already.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to pull SPI MISO line down via device tree configuration</title><link>https://devzone.nordicsemi.com/thread/498367?ContentTypeID=1</link><pubDate>Wed, 14 Aug 2024 21:35:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9518c0ad-772c-4721-94d3-755cf7a58e9d</guid><dc:creator>Alex_S@Aperia</dc:creator><description>&lt;p&gt;Hi Vidar,&amp;nbsp;&lt;br /&gt;That did the trick, sleep current dropped to where we want it to be.&lt;br /&gt;Thank you so much,&lt;br /&gt;Alex&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to pull SPI MISO line down via device tree configuration</title><link>https://devzone.nordicsemi.com/thread/498331?ContentTypeID=1</link><pubDate>Wed, 14 Aug 2024 14:45:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dd66a22a-3310-4abf-bf63-ad25224e3e14</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi, no problem. The &amp;#39;low-power-enable&amp;#39; property is used when you want to configure the pins to their reset state (input, disconnect) after suspending the SPI peripheral. However, it cannot be used while the peripheral is enabled. Therefore, you should remove &amp;#39;low-power-enable&amp;#39; for spi2_default. Everything looks correct apart from that.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to pull SPI MISO line down via device tree configuration</title><link>https://devzone.nordicsemi.com/thread/498308?ContentTypeID=1</link><pubDate>Wed, 14 Aug 2024 14:02:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:602adfd3-ecdf-416c-9b5e-b7dc9aede5a8</guid><dc:creator>Alex_S@Aperia</dc:creator><description>&lt;p&gt;Hi Vidar !&lt;br /&gt;Appreciate prompt response.&lt;br /&gt;So, given the fact that my flash is NOR and I need MISO pulled down, my pinctrl.dtsi should look like this ?&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;spi2_default: spi2_default {
&amp;#160; &amp;#160; group1 {
&amp;#160; &amp;#160; &amp;#160; &amp;#160; psels = &amp;lt;NRF_PSEL(SPIM_SCK, 1, 1)&amp;gt;,
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;lt;NRF_PSEL(SPIM_MOSI, 1, 2)&amp;gt;;
&amp;#160; &amp;#160; &amp;#160; &amp;#160; low-power-enable;
&amp;#160; &amp;#160; };
&amp;#160; &amp;#160; group2 {
&amp;#160; &amp;#160; &amp;#160; &amp;#160; psels = &amp;lt;NRF_PSEL(SPIM_MISO, 0, 11)&amp;gt;;
&amp;#160; &amp;#160; &amp;#160; &amp;#160; low-power-enable;
&amp;#160; &amp;#160; &amp;#160; &amp;#160; bias-pull-down;
&amp;#160; &amp;#160; };
};&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to pull SPI MISO line down via device tree configuration</title><link>https://devzone.nordicsemi.com/thread/498213?ContentTypeID=1</link><pubDate>Wed, 14 Aug 2024 08:26:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:41a783d4-1d7a-4911-853e-6188b3192c95</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Since SDK v2.0.0, the pull configuration has to be applied to the pinctrl node. I&amp;#39;m not sure why the miso-pull-down property was still present in SDK v2.1.2, but it has since been removed. In any case, the additional current consumption may be caused by leakage due to the MISO input&amp;nbsp;becomes floating when the SPI flash enters the power-down state.&lt;/p&gt;
&lt;p&gt;Here is an example on how you can enable pull-up on MISO with the &amp;#39;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/build/dts/api/bindings/pinctrl/nordic_nrf-pinctrl.html#dtbinding-nordic-nrf-pinctrl"&gt;bias-pull-up&lt;/a&gt;&amp;#39; property in your devicetree:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;	spi2_default: spi2_default {
		group1 {
			psels = &amp;lt;NRF_PSEL(SPIM_SCK, 1, 1)&amp;gt;,
				&amp;lt;NRF_PSEL(SPIM_MISO, 1, 2)&amp;gt;;
		};

		group2 {
			psels = &amp;lt;NRF_PSEL(SPIM_MOSI, 0, 11)&amp;gt;;
			bias-pull-up;
		};
	};

	spi2_sleep: spi2_sleep {
		group1 {
			psels = &amp;lt;NRF_PSEL(SPIM_SCK, 0, 19)&amp;gt;,
				&amp;lt;NRF_PSEL(SPIM_MOSI, 0, 20)&amp;gt;,
				&amp;lt;NRF_PSEL(SPIM_MISO, 0, 21)&amp;gt;;
			low-power-enable;
		};
	};&lt;/pre&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Note: the SPI nor driver does not implement PM device power states or change the pin configuration. This means that only the &amp;quot;spi2_default&amp;quot; configuration will be used.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>