<?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>Not able to compile my SPI device</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/98579/not-able-to-compile-my-spi-device</link><description>Hi, 
 I encountered the following 3 issues in 1 single build: 
 error: &amp;#39;DT_N_S_soc_S_peripheral_40000000_S_spi_b000_S_hartmodem_0_P_ spi_max_frequency &amp;#39; undeclared here (not in a function); did you mean &amp;#39;DT_N_S_soc_S_peripheral_40000000_S_spi_b000_S_hartmodem_0_P_compatible_LEN</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 14 Apr 2023 09:30:14 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/98579/not-able-to-compile-my-spi-device" /><item><title>RE: Not able to compile my SPI device</title><link>https://devzone.nordicsemi.com/thread/420442?ContentTypeID=1</link><pubDate>Fri, 14 Apr 2023 09:30:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:51eef2eb-9ea6-4f2f-ad82-9036d71869cd</guid><dc:creator>Menon</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Glad to hear that your issue has been resolved.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Kind Regards,&lt;/p&gt;
&lt;p&gt;Abhijith&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Not able to compile my SPI device</title><link>https://devzone.nordicsemi.com/thread/420342?ContentTypeID=1</link><pubDate>Thu, 13 Apr 2023 19:14:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f3d017fe-1165-4e96-9929-1e7e0460bd28</guid><dc:creator>Hairuo</dc:creator><description>&lt;p&gt;Thank you! I added my custom yaml file and the problem is fixed!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Not able to compile my SPI device</title><link>https://devzone.nordicsemi.com/thread/419647?ContentTypeID=1</link><pubDate>Tue, 11 Apr 2023 11:30:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a20c65bb-23a2-4b25-bba0-26fe250adb47</guid><dc:creator>Mariano Goluboff</dc:creator><description>&lt;p&gt;The &amp;quot;spi-device.yaml&amp;quot; default file doesn&amp;#39;t have a compatible tag, so it can&amp;#39;t be used directly in your overlay file. It should be imported into a custom driver for the SPI device that you are using. For example, you could edit the definition to change&lt;/p&gt;
&lt;p&gt;&lt;code&gt;compatible = &amp;quot;spi-device&amp;quot;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;to:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;compatible = &amp;quot;hartmodem&amp;quot;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Then create a file called: &amp;lt;project base&amp;gt;/dts/bindings/hartmodem.yaml that has this:&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;pre&gt;&lt;span&gt;description&lt;/span&gt;&lt;span&gt;: &lt;/span&gt;&lt;span&gt;Hartmodem driver&lt;br /&gt;&lt;/span&gt;compatible&lt;span&gt;: &lt;/span&gt;&lt;span&gt;&amp;quot;hartmodem&amp;quot;&lt;br /&gt;&lt;/span&gt;include&lt;span&gt;: &lt;/span&gt;&lt;span&gt;spi-device.yaml&lt;/span&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Not able to compile my SPI device</title><link>https://devzone.nordicsemi.com/thread/419470?ContentTypeID=1</link><pubDate>Sun, 09 Apr 2023 19:31:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a54f7955-7856-40f9-8ca7-434b65f621c1</guid><dc:creator>Hairuo</dc:creator><description>&lt;p&gt;Attached is the full-project zip-file here. Hope it helps with the technical support/debug on your side!&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/h2ok_5F00_hart_5F00_spi_5F00_device.zip"&gt;devzone.nordicsemi.com/.../h2ok_5F00_hart_5F00_spi_5F00_device.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Not able to compile my SPI device</title><link>https://devzone.nordicsemi.com/thread/419469?ContentTypeID=1</link><pubDate>Tue, 04 Apr 2023 13:43:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:034cfc1f-dc12-4594-a19f-52d4d48cfe11</guid><dc:creator>Hairuo</dc:creator><description>&lt;p&gt;Hi, I think the pinctrl are defined by default.&amp;nbsp;However, I re-defined the pin-ctrl&amp;nbsp;and it gave me the same error.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;My updated overlay file:&amp;nbsp;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;spi3{
    status = &amp;quot;okay&amp;quot;;
    // compatible = &amp;quot;spi-controller&amp;quot;;
    clock-frequency = &amp;lt; 1250000 &amp;gt;;
    cs-gpios =  &amp;lt;&amp;amp;gpio0 21 GPIO_ACTIVE_LOW&amp;gt;;
    interrupts = &amp;lt;14 NRF_DEFAULT_IRQ_PRIORITY&amp;gt;; 
    hartmodem: hartmodem@0 {
		compatible = &amp;quot;spi-device&amp;quot;;
        status = &amp;quot;okay&amp;quot;;
		reg = &amp;lt;0&amp;gt;;
        spi-max-frequency = &amp;lt; 1250000 &amp;gt;;
        duplex = &amp;lt; 0 &amp;gt;;
        frame-format = &amp;lt; 0 &amp;gt;;
	};
};

&amp;amp;pinctrl {
    spi3_default: spi3_default {
		group1 {
			psels = &amp;lt;NRF_PSEL(SPIM_SCK, 0, 13)&amp;gt;,
				&amp;lt;NRF_PSEL(SPIM_MISO, 0, 12)&amp;gt;,
				&amp;lt;NRF_PSEL(SPIM_MOSI, 0, 11)&amp;gt;;
		};
	};

	spi3_sleep: spi3_sleep {
		group1 {
			psels = &amp;lt;NRF_PSEL(SPIM_SCK, 0, 13)&amp;gt;,
				&amp;lt;NRF_PSEL(SPIM_MISO, 0, 12)&amp;gt;,
				&amp;lt;NRF_PSEL(SPIM_MOSI, 0, 11)&amp;gt;;
			low-power-enable;
		};
	};
   
};

/{
    aliases {
        hartmodem = &amp;amp;hartmodem;
    };
};
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Compiled devicetree output:&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/Screen-Shot-2023_2D00_04_2D00_04-at-9.58.38-AM.png" /&gt;&lt;/p&gt;
&lt;p&gt;Also, this is a build error, so I&amp;#39;m assuming that the pinctrl is not really useful unless you flash to the board &amp;amp; try to read it from an spi device, right?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Not able to compile my SPI device</title><link>https://devzone.nordicsemi.com/thread/419468?ContentTypeID=1</link><pubDate>Tue, 04 Apr 2023 13:31:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ff41c089-2cc6-4bfc-8228-73d0f17ea2c9</guid><dc:creator>Menon</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;The error you are seeing is a Device tree error. When it comes to&amp;nbsp; nRF connect sdk v2.0.0 and higher you need to use Pin control for defining the overlay file. I suggest you to go through the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/app_dev/pin_control/index.html#pin-control"&gt;Pin control section&lt;/a&gt; and&lt;a href="https://academy.nordicsemi.com/topic/configuration-files/"&gt; Dev academy lessons&lt;/a&gt; for writing the overlay file. You can also see some samples in the Devzone itself.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Kind Regards,&lt;/p&gt;
&lt;p&gt;Abhijith&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>