<?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>How to define SPI outputs as &amp;quot;HighDrive&amp;quot; (H0H1) outputs in a overlay file</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/91787/how-to-define-spi-outputs-as-highdrive-h0h1-outputs-in-a-overlay-file</link><description>Hello, 
 I want to define SPI outputs as highdrive outputs in a overlay file. 
 I know how to do this in the code: 
 
 But I want to do this in this overlay file: 
 
 How do I have to modify the overlay file to achieve this ? 
 I am using SDK 2.0.0 &amp;amp;</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 13 Sep 2022 13:00:01 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/91787/how-to-define-spi-outputs-as-highdrive-h0h1-outputs-in-a-overlay-file" /><item><title>RE: How to define SPI outputs as "HighDrive" (H0H1) outputs in a overlay file</title><link>https://devzone.nordicsemi.com/thread/385972?ContentTypeID=1</link><pubDate>Tue, 13 Sep 2022 13:00:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c419b8bd-6636-49ca-a747-838f96b03b96</guid><dc:creator>Georg</dc:creator><description>&lt;p&gt;it seems that it is not possible to configure the CS signal as an&amp;nbsp;&lt;span&gt;H0H1 output in an overlay file. Thank you for your support.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Georg&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to define SPI outputs as "HighDrive" (H0H1) outputs in a overlay file</title><link>https://devzone.nordicsemi.com/thread/385919?ContentTypeID=1</link><pubDate>Tue, 13 Sep 2022 10:35:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8c62c71a-94ef-462a-b1ed-2b7a3e903805</guid><dc:creator>&amp;#216;ivind</dc:creator><description>&lt;p&gt;Ok, on the other pins that makes sense, but since the CS pin will at most be 1/8 or 1/16 the frequency of the other pins, I believe it should be fine at standard drive.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to define SPI outputs as "HighDrive" (H0H1) outputs in a overlay file</title><link>https://devzone.nordicsemi.com/thread/385766?ContentTypeID=1</link><pubDate>Mon, 12 Sep 2022 14:01:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:519177c6-6998-49f9-a0cb-b23abd04ed48</guid><dc:creator>Georg</dc:creator><description>&lt;p&gt;I wired an SPI Flash (M25P40) to the SDK. And&amp;nbsp; I had lot of of problems with wrong data until I changed the CLK to H0H1. So I decided to change all SPI Outputs to H01H1 to avoid furure problems.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to define SPI outputs as "HighDrive" (H0H1) outputs in a overlay file</title><link>https://devzone.nordicsemi.com/thread/385762?ContentTypeID=1</link><pubDate>Mon, 12 Sep 2022 13:49:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ba4b7ce3-f0fb-4755-a8dc-c74d5dedee3c</guid><dc:creator>&amp;#216;ivind</dc:creator><description>&lt;p&gt;I&amp;#39;ll look into why it works differently on SPI4.&lt;/p&gt;
&lt;p&gt;May I ask why you need the CS pin to be high drive? Unless I am missing something, it shouldn&amp;#39;t be needed.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to define SPI outputs as "HighDrive" (H0H1) outputs in a overlay file</title><link>https://devzone.nordicsemi.com/thread/385752?ContentTypeID=1</link><pubDate>Mon, 12 Sep 2022 13:29:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fe7fd968-2dfd-406f-b9fe-d2ab6bbf42c2</guid><dc:creator>Georg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I do not need the 32Mhz but I want to use the GPIOs as defined P1.12, P1.13,...&lt;/p&gt;
&lt;p&gt;I changed the SPI4 to SPI2 now the highdrive configuration works for CLK, MOSI, and MISO.&lt;/p&gt;
&lt;p&gt;But I want also to configure the CS (P1.12) as an&amp;nbsp; H1H0 output.&lt;/p&gt;
&lt;p&gt;How can I do this in the overlay ?&lt;/p&gt;
&lt;p&gt;Here is my current 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;pinctrl {
	spi2_default: spi2_default {
		group1 {
			psels = &amp;lt;NRF_PSEL(SPIM_SCK, 1, 13)&amp;gt;,         // CLK:  P1.13 - lila  - Pin 6
					    &amp;lt;NRF_PSEL(SPIM_MOSI, 1, 14)&amp;gt;;        // MOSI: P1.14 - gr&amp;#252;n  - Pin 5
			nordic,drive-mode = &amp;lt;NRF_DRIVE_H0H1&amp;gt;;
		};
		group2 {
			psels =	&amp;lt;NRF_PSEL(SPIM_MISO, 1, 15)&amp;gt;;        // MISO: P1.15 - weiss - Pin 2	
		};
	};

	spi2_sleep: spi2_sleep {
		group1 {
			psels = &amp;lt;NRF_PSEL(SPIM_SCK, 1, 13)&amp;gt;,         // CLK:  P1.13 - lila  - Pin 6
						  &amp;lt;NRF_PSEL(SPIM_MOSI, 1, 14)&amp;gt;,        // MOSI: P1.14 - gr&amp;#252;n  - Pin 5
							&amp;lt;NRF_PSEL(SPIM_MISO, 1, 15)&amp;gt;;        // MISO: P1.15 - weiss - Pin 2
			low-power-enable;
		};
	};
};

&amp;amp;spi2 {
	compatible = &amp;quot;nordic,nrf-spim&amp;quot;;
	status = &amp;quot;okay&amp;quot;;
	pinctrl-0 = &amp;lt;&amp;amp;spi2_default&amp;gt;;
	pinctrl-1 = &amp;lt;&amp;amp;spi2_sleep&amp;gt;;
	cs-gpios = &amp;lt;&amp;amp;gpio1 12 GPIO_ACTIVE_LOW &amp;gt;;    // CS: P 1.12 - orange - Pin 1
  m25p40: M25P40v@0 {
		compatible = &amp;quot;jedec,spi-nor&amp;quot;;
		label = &amp;quot;M25P40&amp;quot;;
		reg = &amp;lt; 0 &amp;gt;;
		spi-max-frequency = &amp;lt; 40000000 &amp;gt;;
		size = &amp;lt; 0x4000000 &amp;gt;;
		jedec-id = [ C2 20 13 ];
	};  
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Georg&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to define SPI outputs as "HighDrive" (H0H1) outputs in a overlay file</title><link>https://devzone.nordicsemi.com/thread/385688?ContentTypeID=1</link><pubDate>Mon, 12 Sep 2022 10:48:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e76d7f0c-263f-4bc2-a081-4c6d6ef1fdde</guid><dc:creator>&amp;#216;ivind</dc:creator><description>&lt;p&gt;I&amp;#39;ll look into this, but are you trying to use the 32Mbps spi? If so, you&amp;nbsp;must use pins P0.08-P0.12.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fps_nrf5340%2Fchapters%2Fpin.html&amp;amp;cp=3_0_0_8_0"&gt;https://infocenter.nordicsemi.com/index.jsp?topic=%2Fps_nrf5340%2Fchapters%2Fpin.html&amp;amp;cp=3_0_0_8_0&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I checked the driver, and it&amp;nbsp;automatically sets the drive strength to H0H1 if you are using the spi4, set to 32M on the appropriate pins. Otherwise it will set the drive strength to S0S1.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to define SPI outputs as "HighDrive" (H0H1) outputs in a overlay file</title><link>https://devzone.nordicsemi.com/thread/385677?ContentTypeID=1</link><pubDate>Mon, 12 Sep 2022 10:14:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:32c675a8-c586-420c-82fe-761ddea00177</guid><dc:creator>Georg</dc:creator><description>&lt;p&gt;Hello again,&lt;/p&gt;
&lt;p&gt;when looking a little bit deeper it seems not to work.&lt;/p&gt;
&lt;p&gt;With the follwing sequence I expect to configure P1.13 and&lt;/p&gt;
&lt;p&gt;P1.14 as high-drive outputs (H0H1):&lt;/p&gt;
&lt;p&gt;:&lt;pre class="ui-code" data-mode="text"&gt;...

&amp;amp;pinctrl {
	spi4_default: spi4_default {
		group1 {
			psels = &amp;lt;NRF_PSEL(SPIM_SCK, 1, 13)&amp;gt;,         // CLK:  P1.13 - lila  - Pin 6
					&amp;lt;NRF_PSEL(SPIM_MOSI, 1, 14)&amp;gt;;        // MOSI: P1.14 - gr&amp;#252;n  - Pin 5		
			nordic,drive-mode = &amp;lt;NRF_DRIVE_H0H1&amp;gt;;
		};
		group2 {
			psels =	&amp;lt;NRF_PSEL(SPIM_MISO, 1, 15)&amp;gt;;        // MISO: P1.15 - weiss - Pin 2			
		};
	};
...&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I stopped teh debugger at the beginning of main and then I see:&lt;/p&gt;
&lt;p&gt;P1.13 ist confgured as S0S1 and not as&amp;nbsp;&lt;span&gt;H0H1&lt;/span&gt;&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/pastedimage1662977362648v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;P1.13 ist confgured as S0S1 and not as&amp;nbsp;&lt;span&gt;H0H1&lt;/span&gt;&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/pastedimage1662977462072v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Georg&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to define SPI outputs as "HighDrive" (H0H1) outputs in a overlay file</title><link>https://devzone.nordicsemi.com/thread/385634?ContentTypeID=1</link><pubDate>Mon, 12 Sep 2022 06:56:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:97ae02a3-2a56-4b97-9603-7dc9654f5f57</guid><dc:creator>Georg</dc:creator><description>&lt;p&gt;Hello Oivind,&lt;/p&gt;
&lt;p&gt;thank you for your answer,&lt;/p&gt;
&lt;p&gt;It works for SPIM_SCK and SPIM_MOSI but how can I do it&amp;nbsp; for the CS&amp;nbsp; (&lt;span&gt;&lt;/span&gt;cs-gpios)&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Georg&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to define SPI outputs as "HighDrive" (H0H1) outputs in a overlay file</title><link>https://devzone.nordicsemi.com/thread/385457?ContentTypeID=1</link><pubDate>Fri, 09 Sep 2022 09:02:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:54b37268-7ac2-4b87-b9d9-d58ccbb33f38</guid><dc:creator>&amp;#216;ivind</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Try adding this line to the group1 node:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;nordic,drive-mode = &amp;lt;NRF_DRIVE_H0H1&amp;gt;;&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>