<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>nRF5340 SPI Master Sample Code</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/101856/nrf5340-spi-master-sample-code</link><description>Hi! I&amp;#39;m trying to build the example (SPI Master) but I was not able to compile without errors. 
 My environment is SDK 2.2.0, the board choosed is the Nordic 5340dk (I have an Ublox NORA EVK 106-B that is pretty similar &amp;amp; I have also the device tree)</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sun, 30 Jul 2023 13:15:55 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/101856/nrf5340-spi-master-sample-code" /><item><title>RE: nRF5340 SPI Master Sample Code</title><link>https://devzone.nordicsemi.com/thread/438863?ContentTypeID=1</link><pubDate>Sun, 30 Jul 2023 13:15:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4cb5872a-c33c-43b0-9e8e-320a94502e92</guid><dc:creator>Susheel Nuguru</dc:creator><description>[quote user="0x00"]&lt;p&gt;- The MOSI goes HIGH before that the CS goes down. The MOSI goes HIGH after the 8th Clock cycle.&lt;/p&gt;
&lt;p&gt;- The MOSI has a strange behavior in the first 2 clock cycle&lt;/p&gt;[/quote]
&lt;p&gt;It looks to me that it could be an issue with the pull configuration of the SPI pins. We have seem that if the pin pull configuration is not configured correctly then it can be pulled high or low from the sensor.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
[quote user="0x00"]Can the SPIM driver used into the fujitsu_fram be used to implement a comunication with the MCP3562?[/quote]
&lt;p&gt;Not sure. We haven&amp;#39;t tried it yet. But our SPI peripheral is known to work with thousands of sensors without any issue. So as long as the MCP3562 obeys the SPI specification, I do not see why it should not work. That said, I do not see anyone else trying this combination with our SPI. I would also not rule out any custom board related issues with cross talks effects as well.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SPI Master Sample Code</title><link>https://devzone.nordicsemi.com/thread/438065?ContentTypeID=1</link><pubDate>Tue, 25 Jul 2023 11:59:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2287e106-b8f6-4538-8a10-956b5cca7d8c</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Due to the summer vacation period we are currently understaffed, so delayed replies must be expected. I am sorry about any inconvenience this might cause.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m sorry, but I will need to reassign this case to another engineer that knows more about this subject than myself. Hopefully they&amp;#39;ll get back to you tomorrow.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SPI Master Sample Code</title><link>https://devzone.nordicsemi.com/thread/437576?ContentTypeID=1</link><pubDate>Fri, 21 Jul 2023 06:30:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6583563f-10d1-42a2-b9f8-de28f4a97491</guid><dc:creator>0x00</dc:creator><description>&lt;p&gt;Morning,&lt;/p&gt;
&lt;p&gt;I have a dubt..&lt;/p&gt;
&lt;p&gt;Can the SPIM driver used into the fujitsu_fram be used to implement a comunication with the MCP3562?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:480px;max-width:640px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/1280x960/__key/communityserver-discussions-components-files/4/pastedimage1689920981349v2.png" /&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m asking that because when I try to configure teh example to my need (8bit CMD)... something does not work properly.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;int mcp3562_maccess(const struct device *spi, struct spi_config *spi_cfg, 
					uint8_t cmd, uint8_t addr, void *data, size_t len)
{
	uint8_t access[1];
	struct spi_buf bufs[] = {
		{
			.buf = access,
		},
		{
			.buf = data,
			.len = len
		}
	};
	struct spi_buf_set tx = {
		.buffers = bufs
	};

	access[0] = (cmd | (addr &amp;lt;&amp;lt; 2));

	if (cmd == MCP3562_WRITE_COMMAND || cmd == MCP3562_SREAD_DATA_COMMAND) {
		//access[1] = 0x00;

		bufs[0].len = 1;
		tx.count = 1;

		if (cmd == MCP3562_SREAD_DATA_COMMAND) {
			struct spi_buf_set rx = {
				.buffers = bufs,
				.count = 2
			};

			return spi_transceive(spi, spi_cfg, &amp;amp;tx, &amp;amp;rx);
		}
	} else {
		tx.count = 1;
	}

	return mcp3562_write_bytes(spi, spi_cfg, addr, &amp;amp;tx, len);

}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;in access function I modified:&lt;/p&gt;
&lt;p&gt;- the array siize from 3 to 1 (because the CMD include the address).&lt;/p&gt;
&lt;p&gt;- The bufs[0].len to 1 (because my array contains only 1 command 1 byte)&lt;/p&gt;
&lt;p&gt;- The tx.count to 1 (because I need to transmit 1 byte)&lt;/p&gt;
&lt;p&gt;When I do this the result is the screenshot below&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:640px;max-width:480px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/960x1280/__key/communityserver-discussions-components-files/4/pastedimage1689922483942v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;The read operation of the register 0x00, in this case, forsees the writing of a command byte &amp;quot;01000001&amp;quot;.&lt;/p&gt;
&lt;p&gt;but:&lt;/p&gt;
&lt;p&gt;- The MOSI goes HIGH before that the CS goes down. The MOSI goes HIGH after the 8th Clock cycle.&lt;/p&gt;
&lt;p&gt;- The MOSI has a strange behavior in the first 2 clock cycle&lt;/p&gt;
&lt;p&gt;- Obviously.. the MISO is silent.&lt;/p&gt;
&lt;p&gt;What I&amp;#39;m wrong?&lt;/p&gt;
&lt;p&gt;Many Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SPI Master Sample Code</title><link>https://devzone.nordicsemi.com/thread/437499?ContentTypeID=1</link><pubDate>Thu, 20 Jul 2023 14:02:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e2ef5814-d9db-4963-9cab-4cb125ab91e3</guid><dc:creator>0x00</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I redefined the overlay file as follow:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;
&amp;amp;spi4 {
    cs-gpios = &amp;lt;&amp;amp;gpio1 12 (GPIO_ACTIVE_LOW)&amp;gt;;
};

&amp;amp;pinctrl {
	spi_master_default: spi_master_default {
		group1 {
			psels = &amp;lt;NRF_PSEL(SPIM_SCK, 1, 15)&amp;gt;,
				&amp;lt;NRF_PSEL(SPIM_MISO, 1, 14)&amp;gt;,
				&amp;lt;NRF_PSEL(SPIM_MOSI, 1, 13)&amp;gt;;
		};
	};

	spi_master_sleep: spi_master_sleep {
		group1 {
			psels = &amp;lt;NRF_PSEL(SPIM_SCK, 1, 15)&amp;gt;,
				&amp;lt;NRF_PSEL(SPIM_MISO, 1, 14)&amp;gt;,
				&amp;lt;NRF_PSEL(SPIM_MOSI, 1, 13)&amp;gt;;
			low-power-enable;
		};
	};
};

my_spi_master: &amp;amp;spi4 {
    //label =&amp;quot;MYSPI&amp;quot;;
    status = &amp;quot;okay&amp;quot;;
	compatible = &amp;quot;nordic,nrf-spim&amp;quot;;
	status = &amp;quot;okay&amp;quot;;
	pinctrl-0 = &amp;lt;&amp;amp;spi_master_default&amp;gt;;
	pinctrl-1 = &amp;lt;&amp;amp;spi_master_sleep&amp;gt;;
	pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;
	cs-gpios = &amp;lt;&amp;amp;gpio0 26 GPIO_ACTIVE_LOW&amp;gt;, &amp;lt;&amp;amp;gpio1 12 GPIO_ACTIVE_LOW&amp;gt;;
    mcp3562a: spi-device@0 {
        //spi-max-frequency = &amp;lt;8000000&amp;gt;;
		reg = &amp;lt;0&amp;gt;;
	};
	mcp3562b: spi-device@1 {
        //spi-max-frequency = &amp;lt;8000000&amp;gt;;
		reg = &amp;lt;1&amp;gt;;
	};
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;And I was able to see the interface that moves the signals.&lt;/p&gt;
&lt;p&gt;But somenthing don&amp;#39;t seems to be correct.&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/spi1.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;In the screenshot above I&amp;#39;m running the original example fujitsu_fram, the fw is tryng to do a read/write op (stated in the code attached.. but seems to me a Write Op) a 0xAE (10101110):&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/* Do one-byte read/write */
		data[0] = 0xAE;
		err = write_bytes(spi, &amp;amp;spi_cfg, 0x00, data, 1);
		if (err) {
			printk(&amp;quot;Error writing to FRAM! error code (%d)\n&amp;quot;, err);
			return;
		} else {
			printk(&amp;quot;Wrote 0xAE to address 0x00.\n&amp;quot;);
		}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;the write CMD should be the first eight bit (0x01). Followed by 16bit ADDR. Therefore the 0xAE pattern.&lt;/p&gt;
&lt;p&gt;The transmission seems ok (since i run it on the Ublox board that hasn&amp;#39;t the memory unfortunatly we can&amp;#39;t see an answer on the MISO signal).&lt;/p&gt;
&lt;p&gt;What it&amp;#39;s NOK is that on the MISO line we can see a shadow of the MOSI one (could be a crosstalk between the cables that i used for the oscilloscope.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;When I run my variations (Enabling the TESTAPP define on the top of the main file) I try to read of the CONFIG0 (0x01) register of the MCP3562 (ADC), instead of the Fujitsu Memory.&lt;/p&gt;
&lt;div style="background-color:#1f1f1f;color:#cccccc;font-family:Consolas, &amp;#39;Courier New&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;while&lt;/span&gt;&lt;span style="color:#cccccc;"&gt;(&lt;/span&gt;&lt;span style="color:#b5cea8;"&gt;1&lt;/span&gt;&lt;span style="color:#cccccc;"&gt;){&lt;/span&gt;&lt;span style="color:#6a9955;"&gt; //TEST LOOP&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#cccccc;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style="color:#9cdcfe;"&gt;data&lt;/span&gt;&lt;span style="color:#cccccc;"&gt;[&lt;/span&gt;&lt;span style="color:#b5cea8;"&gt;0&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;0x00&lt;/span&gt;&lt;span style="color:#cccccc;"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#cccccc;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; err &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:#dcdcaa;"&gt;mcp3562_read_bytes&lt;/span&gt;&lt;span style="color:#cccccc;"&gt;(spi, &lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt;&amp;amp;&lt;/span&gt;&lt;span style="color:#cccccc;"&gt;spi_cfg, &lt;/span&gt;&lt;span style="color:#b5cea8;"&gt;0x01&lt;/span&gt;&lt;span style="color:#cccccc;"&gt;, data, &lt;/span&gt;&lt;span style="color:#b5cea8;"&gt;1&lt;/span&gt;&lt;span style="color:#cccccc;"&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#cccccc;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style="color:#c586c0;"&gt;if&lt;/span&gt;&lt;span style="color:#cccccc;"&gt; (err) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#cccccc;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style="color:#dcdcaa;"&gt;printk&lt;/span&gt;&lt;span style="color:#cccccc;"&gt;(&lt;/span&gt;&lt;span style="color:#ce9178;"&gt;&amp;quot;Error reading from ADC! error code (&lt;/span&gt;&lt;span style="color:#9cdcfe;"&gt;%d&lt;/span&gt;&lt;span style="color:#ce9178;"&gt;)&lt;/span&gt;&lt;span style="color:#d7ba7d;"&gt;\n&lt;/span&gt;&lt;span style="color:#ce9178;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color:#cccccc;"&gt;, err);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#cccccc;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style="color:#6a9955;"&gt;//return;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#cccccc;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } &lt;/span&gt;&lt;span style="color:#c586c0;"&gt;else&lt;/span&gt;&lt;span style="color:#cccccc;"&gt; {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#cccccc;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style="color:#dcdcaa;"&gt;printk&lt;/span&gt;&lt;span style="color:#cccccc;"&gt;(&lt;/span&gt;&lt;span style="color:#ce9178;"&gt;&amp;quot;Read 0x&lt;/span&gt;&lt;span style="color:#9cdcfe;"&gt;%X&lt;/span&gt;&lt;span style="color:#ce9178;"&gt; from address 0x01.&lt;/span&gt;&lt;span style="color:#d7ba7d;"&gt;\n&lt;/span&gt;&lt;span style="color:#ce9178;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color:#cccccc;"&gt;, &lt;/span&gt;&lt;span style="color:#9cdcfe;"&gt;data&lt;/span&gt;&lt;span style="color:#cccccc;"&gt;[&lt;/span&gt;&lt;span style="color:#b5cea8;"&gt;0&lt;/span&gt;&lt;span style="color:#cccccc;"&gt;]);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#cccccc;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#cccccc;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;And the below screeshot with the waveforms:&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/6036.spi2.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;I can see some strange things. In particular the metastable value of the first &amp;quot;1&amp;quot; bit.&lt;/p&gt;
&lt;p&gt;I tought that the way to source CMDs to my device is different respect the memory.&lt;/p&gt;
&lt;p&gt;If I want to read the CONFIG0 register I need to send the command 01000101 (where CMD[7:6] is Hard Code of the device, CMD[5:2] is the Address of the register and the CMD[1:0] is the Read Command). The CMD includes all informations required.&lt;/p&gt;
&lt;p&gt;I tryed to modfy the code to fit the constraints but below another screenshot with the results:&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/spi3.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;It&amp;#39;s not clear to me:&lt;br /&gt;- Why at the start of the word there&amp;#39;s a metastable value?&lt;/p&gt;
&lt;p&gt;- Why the first &amp;quot;1&amp;quot; (second bit) is, let me say, &amp;quot;castrated&amp;quot;.&lt;/p&gt;
&lt;p&gt;- Why before and after the CMD the MOSI signal is HIGH.&lt;/p&gt;
&lt;p&gt;Another opened point is that the&amp;nbsp; ADC registers has a depth of 8bits (otherwise the sampled datas can be 8/24/32 bits) .&amp;nbsp; How the driver is thougth to manage this situations?&lt;/p&gt;
&lt;p&gt;My Code attached.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/20230720_2D00_my_5F00_spi_5F00_fujitsu_5F00_fram_2D00_B.zip"&gt;devzone.nordicsemi.com/.../20230720_2D00_my_5F00_spi_5F00_fujitsu_5F00_fram_2D00_B.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;many Thanks &amp;amp; Best Regards&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SPI Master Sample Code</title><link>https://devzone.nordicsemi.com/thread/437394?ContentTypeID=1</link><pubDate>Thu, 20 Jul 2023 06:55:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0df2f86b-4e7e-44ef-84f3-b275bb892d26</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;With &amp;quot;the same behavior&amp;quot;, I assume you&amp;#39;re still seeing these multiple &amp;quot;&lt;strong&gt;error: &amp;#39;__device_dts_ord_109&amp;#39; undeclared here (not in a function)&lt;/strong&gt;&lt;strong&gt;;&lt;/strong&gt;&amp;quot; messages, correct? If so I&amp;#39;d recommend checking out this super helpful blog post by Golioth:&amp;nbsp;&lt;a href="https://blog.golioth.io/zephyr-devicetree-troubleshooting-generated-files/"&gt;https://blog.golioth.io/zephyr-devicetree-troubleshooting-generated-files/&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If not, please try to describe what behavior you&amp;#39;re seeing, as I&amp;#39;m a little confused as to what the issue actually is here.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SPI Master Sample Code</title><link>https://devzone.nordicsemi.com/thread/436940?ContentTypeID=1</link><pubDate>Tue, 18 Jul 2023 09:06:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4ad18bf8-1f9c-47ab-afd6-e7d3068dc727</guid><dc:creator>0x00</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Actually with the spi_fujitsu_fram example &amp;amp; 53540DK BSP I can see the SCK &amp;amp; MOSI Signals.&lt;/p&gt;
&lt;p&gt;The problem is the CSn signal that is stucked to the High Level (3.3V).&lt;/p&gt;
&lt;p&gt;For this signal I have a definition in the nrf5340_cpuapp_common.dts&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;
arduino_spi: &amp;amp;spi4 {
	compatible = &amp;quot;nordic,nrf-spim&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;spi4_default&amp;gt;;
	pinctrl-1 = &amp;lt;&amp;amp;spi4_sleep&amp;gt;;
	pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;but this seems not to be enough (because in the Device Tree Visualizer the pin does not appear).&lt;/p&gt;
&lt;p&gt;I forced the following definition into the nrf5340dk_nrf5340_cpuapp.overlay.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;
&amp;amp;spi4 {
    cs-gpios = &amp;lt;&amp;amp;gpio1 12 (GPIO_ACTIVE_LOW)&amp;gt;;
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;With this I can see the CSn pin allocated on the wanted pin. Unfortunatly this don&amp;#39;t seems to be enough.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Suggestions?&lt;/p&gt;
&lt;p&gt;Many Thanks for your support &amp;amp; Kindness.&lt;/p&gt;
&lt;p&gt;Best Regards&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SPI Master Sample Code</title><link>https://devzone.nordicsemi.com/thread/436813?ContentTypeID=1</link><pubDate>Mon, 17 Jul 2023 15:03:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ae794f36-bf15-40f5-8c14-ad269f54dfda</guid><dc:creator>0x00</dc:creator><description>&lt;p&gt;Also with the last example the behaviour is the same.&lt;/p&gt;
&lt;p&gt;No signals on the EVK connector.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/ncs_2D00_spi_2D00_master_2D00_slave_2D00_example.zip"&gt;devzone.nordicsemi.com/.../ncs_2D00_spi_2D00_master_2D00_slave_2D00_example.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I tested with the Ublox Nora 106B EVK (clone of the 5340DK).&lt;/p&gt;
&lt;p&gt;This is very strange .. I don&amp;#39;t believe that the same behavior can affect 3x different projects.&lt;/p&gt;
&lt;p&gt;for the ncs-spi-master-slave-example projec &amp;amp; 5340DK board:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:684px;max-width:638px;" alt=" " height="684" src="https://devzone.nordicsemi.com/resized-image/__size/1276x1368/__key/communityserver-discussions-components-files/4/Spi_5F00_MASLA_5F00_2.png" width="638" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;For the spi_fujitsu_fram prohject &amp;amp; Ublox NORA 106B EVK:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:580px;max-width:686px;" alt=" " height="580" src="https://devzone.nordicsemi.com/resized-image/__size/1372x1160/__key/communityserver-discussions-components-files/4/Spi_5F00_MASLA_5F00_3.png" width="686" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The Non-Blocking SPI is the same.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Actually I&amp;#39;m blocked and don&amp;#39;t understand what the problem is.&lt;/p&gt;
&lt;p&gt;Suggestions?&lt;/p&gt;
&lt;p&gt;Many Thanks &amp;amp; Best Regards&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SPI Master Sample Code</title><link>https://devzone.nordicsemi.com/thread/436773?ContentTypeID=1</link><pubDate>Mon, 17 Jul 2023 13:40:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:18cd200c-0733-4fb9-bd9c-26f1a85bc065</guid><dc:creator>0x00</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;not relevant progress... unfortunatly.&lt;/p&gt;
&lt;p&gt;Actually I built the spi_fujitsu_fram... but I can&amp;#39;t see any signal in my oscilloscope.&lt;/p&gt;
&lt;p&gt;The board that I&amp;#39;m using its the UBLOX NORA 106 (clone of the 5340DK).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Attached the actual code.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/my_5F00_spi_5F00_fujitsu_5F00_fram.zip"&gt;devzone.nordicsemi.com/.../my_5F00_spi_5F00_fujitsu_5F00_fram.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t understand what I&amp;#39;m doing wrong..&lt;/p&gt;
&lt;p&gt;The CSn signal was mapped using the Overlay file because it was not included during the SPI4 configuration.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Abnother example based on NoN-Blocking NRFX driver seems to have the same behavior (Files attached).&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/selcom_5F00_corrosion_5F00_buddy_5F00_230714_5F00_SPI_5F00_NON_5F00_BLOCKING.7z"&gt;devzone.nordicsemi.com/.../selcom_5F00_corrosion_5F00_buddy_5F00_230714_5F00_SPI_5F00_NON_5F00_BLOCKING.7z&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In the last example If I put a breakpoint on the row 540 of the main.c file (where the transfer should be happened) I not able to see the signals on the pins GPIO.1.12/13/14/15.&lt;/p&gt;
&lt;p&gt;Many Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SPI Master Sample Code</title><link>https://devzone.nordicsemi.com/thread/436747?ContentTypeID=1</link><pubDate>Mon, 17 Jul 2023 12:39:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c65af5cf-23c6-4091-a7be-16e4d9c82a5c</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;We have a few unofficial sample projects on SPIM available made for the nRF5x series devices specifically. An SPIM and SPIS sample using the Async. drivers in Zephyr is available here:&amp;nbsp;&lt;a href="https://github.com/too1/ncs-spi-master-slave-example"&gt;https://github.com/too1/ncs-spi-master-slave-example&lt;/a&gt;. We also have a somewhat old SPIM sample &lt;a href="https://github.com/crfosse/ncs_projects/tree/main/peripheral_zephyr/spi"&gt;here &lt;/a&gt;for the nRF53 and nRF91.&lt;/p&gt;
&lt;p&gt;Have you had any progress over the weekend? Do you have any specific issues as of now that I might help you answer?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SPI Master Sample Code</title><link>https://devzone.nordicsemi.com/thread/436398?ContentTypeID=1</link><pubDate>Fri, 14 Jul 2023 08:01:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ad3577ba-46bd-49f0-afde-d6b2ea2da46d</guid><dc:creator>0x00</dc:creator><description>&lt;p&gt;After several NOK tests...&lt;/p&gt;
&lt;p&gt;1- in my board device tree I defined an alias for the SPI that I need to use&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/* 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;
		spi-flash0 = &amp;amp;mx25r64;
		spi4 = &amp;amp;spi4;
	};
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;2- I tryed several way to do the binding but the nesting of&amp;nbsp;&lt;span&gt;DEVICE_DT_GET&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;DT_ALIAS&lt;/span&gt;&lt;span&gt;(alias)) was the good one.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;void main(void)
{
	const struct device *spi;
	struct spi_config spi_cfg = {0};
	int err;

	printk(&amp;quot;fujitsu FRAM example application\n&amp;quot;);
	//spi = device_get_binding(DT_LABEL(DT_NODELABEL(spi4)));
	//spi = DEVICE_DT_GET(spi4);
	spi = DEVICE_DT_GET(DT_ALIAS(spi4));

	if (!device_is_ready(spi)) {
		printk(&amp;quot;SPI device %s is not ready\n&amp;quot;, spi-&amp;gt;name);
		return;
	}

	spi_cfg.operation = SPI_WORD_SET(8);
	spi_cfg.frequency = 256000U;


	err = mb85rs64v_read_id(spi, &amp;amp;spi_cfg);
	if (err) {
		printk(&amp;quot;Could not verify FRAM ID\n&amp;quot;);
		return;
	}

	/* Do one-byte read/write */
	data[0] = 0xAE;
	err = write_bytes(spi, &amp;amp;spi_cfg, 0x00, data, 1);
	if (err) {
		printk(&amp;quot;Error writing to FRAM! error code (%d)\n&amp;quot;, err);
		return;
	} else {
		printk(&amp;quot;Wrote 0xAE to address 0x00.\n&amp;quot;);
	}

	data[0] = 0x86;
	err = write_bytes(spi, &amp;amp;spi_cfg, 0x01, data, 1);
	if (err) {
		printk(&amp;quot;Error writing to FRAM! error code (%d)\n&amp;quot;, err);
		return;
	} else {
		printk(&amp;quot;Wrote 0x86 to address 0x01.\n&amp;quot;);
	}

	data[0] = 0x00;
	err = read_bytes(spi, &amp;amp;spi_cfg, 0x00, data, 1);
	if (err) {
		printk(&amp;quot;Error reading from FRAM! error code (%d)\n&amp;quot;, err);
		return;
	} else {
		printk(&amp;quot;Read 0x%X from address 0x00.\n&amp;quot;, data[0]);
	}

	data[0] = 0x00;
	err = read_bytes(spi, &amp;amp;spi_cfg, 0x01, data, 1);
	if (err) {
		printk(&amp;quot;Error reading from FRAM! error code (%d)\n&amp;quot;, err);
		return;
	} else {
		printk(&amp;quot;Read 0x%X from address 0x01.\n&amp;quot;, data[0]);
	}

	/* Do multi-byte read/write */
	/* get some random data, and clear out data[] */
	for (uint32_t i = 0; i &amp;lt; sizeof(cmp_data); i++) {
		cmp_data[i] = k_cycle_get_32() &amp;amp; 0xFF;
		data[i] = 0x00;
	}

	/* write them to the FRAM */
	err = write_bytes(spi, &amp;amp;spi_cfg, 0x00, cmp_data, sizeof(cmp_data));
	if (err) {
		printk(&amp;quot;Error writing to FRAM! error code (%d)\n&amp;quot;, err);
		return;
	} else {
		printk(&amp;quot;Wrote %d bytes to address 0x00.\n&amp;quot;,
		       (uint32_t) sizeof(cmp_data));
	}

	err = read_bytes(spi, &amp;amp;spi_cfg, 0x00, data, sizeof(data));
	if (err) {
		printk(&amp;quot;Error reading from FRAM! error code (%d)\n&amp;quot;, err);
		return;
	} else {
		printk(&amp;quot;Read %d bytes from address 0x00.\n&amp;quot;,
		       (uint32_t) sizeof(data));
	}

	err = 0;
	for (uint32_t i = 0; i &amp;lt; sizeof(cmp_data); i++) {
		if (cmp_data[i] != data[i]) {
			printk(&amp;quot;Data comparison failed @ %d.\n&amp;quot;, i);
			err = -EIO;
		}
	}
	if (err == 0) {
		printk(&amp;quot;Data comparison successful.\n&amp;quot;);
	}
}
&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;3- I silently modified some header&amp;#39;s inclusions.&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;#include &amp;lt;zephyr/device.h&amp;gt;
#include &amp;lt;zephyr/drivers/spi.h&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;before them are without the path (and was no good).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;With this modifications the building process was good.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Now I need to port in my application... I hope this will be smoothy.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Attached my template&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;.&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/spi_5F00_fujitsu_5F00_fram_2D00_Revisited.zip"&gt;devzone.nordicsemi.com/.../spi_5F00_fujitsu_5F00_fram_2D00_Revisited.zip&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Opened to suggestions.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SPI Master Sample Code</title><link>https://devzone.nordicsemi.com/thread/436396?ContentTypeID=1</link><pubDate>Fri, 14 Jul 2023 07:50:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d66bead3-df89-4e6b-ab82-cb1abce08be8</guid><dc:creator>0x00</dc:creator><description>&lt;p&gt;This thread&amp;nbsp;&lt;a title="SPI Template Issue" href="https://devzone.nordicsemi.com/f/nordic-q-a/77319/spi-config-overlay-issue-with-spi_fujitsu_fram-zephyr-example"&gt;spi-config-overlay-issue-with-spi_fujitsu_fram-zephyr-example&lt;/a&gt;&amp;nbsp;seems very similar to my cas.&lt;/p&gt;
&lt;p&gt;But the reference is, probably, too old and maybe the solution needs to be ported to the new Zephyr.&lt;/p&gt;
&lt;p&gt;From the docs (&lt;a href="https://docs.zephyrproject.org/latest/kernel/drivers/index.html#api-reference"&gt;docs.zephy api-reference&lt;/a&gt;) seems that when a&amp;nbsp;&lt;span class="sig-name descname"&gt;&lt;span class="n"&gt;&lt;span class="pre"&gt;DEVICE_DT_GET&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="sig-paren"&gt;(&lt;/span&gt;&lt;span class="n"&gt;&lt;span class="pre"&gt;node_id&lt;/span&gt;&lt;/span&gt;&lt;span class="sig-paren"&gt;)&amp;nbsp; occurs if&lt;/span&gt;&amp;nbsp;no such device was allocated, this will fail at linker time. If you get an error that looks like&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;undefined&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="pre"&gt;reference&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="pre"&gt;to&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="pre"&gt;__device_dts_ord_&amp;lt;N&amp;gt;&lt;/span&gt;&lt;/code&gt;, that is what happened.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In my output:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;C:\ncs\v2.2.0\zephyr\include\zephyr\device.h:83:41: error: &amp;#39;__device_dts_ord_spi4_ORD&amp;#39; undeclared (first use in this function); did you mean &amp;#39;__device_dts_ord_64&amp;#39;?&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SPI Master Sample Code</title><link>https://devzone.nordicsemi.com/thread/436304?ContentTypeID=1</link><pubDate>Thu, 13 Jul 2023 14:52:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:39db4f0a-aebe-4f1a-91d0-c5adabd623a7</guid><dc:creator>0x00</dc:creator><description>&lt;p&gt;I tryed, under suggestion, to build the example named spi_fujitsu_fram (for 5340DK &amp;amp; Ublox boards) the problem is different but similar:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;-- west build: generating a build system
Loading Zephyr default modules (Zephyr base).
-- Application: C:/Users/cirincione/nordic/spi_fujitsu_fram
-- Found Python3: C:/ncs/toolchains/v2.2.0/opt/bin/python.exe (found suitable exact version &amp;quot;3.8.2&amp;quot;) found components: Interpreter 
-- Cache files will be written to: C:/ncs/v2.2.0/zephyr/.cache
-- Zephyr version: 3.2.99 (C:/ncs/v2.2.0/zephyr)
-- Found west (found suitable version &amp;quot;0.14.0&amp;quot;, minimum required is &amp;quot;0.7.1&amp;quot;)
-- Board: thingy53_nrf5340_cpuapp
-- Found host-tools: zephyr 0.15.1 (C:/ncs/toolchains/v2.2.0/opt/zephyr-sdk)
-- Found toolchain: zephyr 0.15.1 (C:/ncs/toolchains/v2.2.0/opt/zephyr-sdk)
-- Found Dtc: C:/ncs/toolchains/v2.2.0/opt/bin/dtc.exe (found suitable version &amp;quot;1.4.7&amp;quot;, minimum required is &amp;quot;1.4.6&amp;quot;) 
-- Found BOARD.dts: C:/ncs/v2.2.0/zephyr/boards/arm/thingy53_nrf5340/thingy53_nrf5340_cpuapp.dts
-- Generated zephyr.dts: C:/Users/cirincione/nordic/spi_fujitsu_fram/build/zephyr/zephyr.dts
-- Generated devicetree_generated.h: C:/Users/cirincione/nordic/spi_fujitsu_fram/build/zephyr/include/generated/devicetree_generated.h
-- Including generated dts.cmake file: C:/Users/cirincione/nordic/spi_fujitsu_fram/build/zephyr/dts.cmake
Parsing C:/ncs/v2.2.0/zephyr/Kconfig
Loaded configuration &amp;#39;C:/ncs/v2.2.0/zephyr/boards/arm/thingy53_nrf5340/thingy53_nrf5340_cpuapp_defconfig&amp;#39;
Merged configuration &amp;#39;c:/Users/cirincione/nordic/spi_fujitsu_fram/prj.conf&amp;#39;
Configuration saved to &amp;#39;C:/Users/cirincione/nordic/spi_fujitsu_fram/build/zephyr/.config&amp;#39;
Kconfig header saved to &amp;#39;C:/Users/cirincione/nordic/spi_fujitsu_fram/build/zephyr/include/generated/autoconf.h&amp;#39;
-- The C compiler identification is GNU 12.1.0
-- The CXX compiler identification is GNU 12.1.0
-- The ASM compiler identification is GNU
-- Found assembler: C:/ncs/toolchains/v2.2.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe
-- Found partition manager static configuration: C:/ncs/v2.2.0/zephyr/boards/arm/thingy53_nrf5340/pm_static_thingy53_nrf5340_cpuapp.yml
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/cirincione/nordic/spi_fujitsu_fram/build
-- west build: building application
[1/181] Generating include/generated/version.h
-- Zephyr version: 3.2.99 (C:/ncs/v2.2.0/zephyr), build: v3.2.99-ncs1
[2/181] Generating misc/generated/syscalls.json, misc/generated/struct_tags.json
[3/181] Generating include/generated/kobj-types-enum.h, include/generated/otype-to-str.h, include/generated/otype-to-size.h
[4/181] Generating include/generated/driver-validation.h
[5/181] Generating include/generated/syscall_dispatch.c, include/generated/syscall_list.h
[6/181] Building C object zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj
[7/181] Generating include/generated/offsets.h
[8/181] Building C object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/irq_init.c.obj
[9/181] Building C object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/fpu.c.obj
[10/181] Building ASM object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/cpu_idle.S.obj
[11/181] Building ASM object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/nmi_on_reset.S.obj
[12/181] Building C object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/irq_manage.c.obj
[13/181] Building C object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/fault.c.obj
[14/181] Building C object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/fatal.c.obj
[15/181] Building C object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/nmi.c.obj
[16/181] Building ASM object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/isr_wrapper.S.obj
[17/181] Building ASM object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/swap_helper.S.obj
[18/181] Building C object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/thread.c.obj
[19/181] Building C object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/prep_c.c.obj
[20/181] Building ASM object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/exc_exit.S.obj
[21/181] Building C object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/swap.c.obj
[22/181] Generating linker_zephyr_pre0.cmd
[23/181] Building ASM object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/vector_table.S.obj
[24/181] Building C object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/thread_abort.c.obj
[25/181] Building ASM object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/reset.S.obj
[26/181] Building C object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/scb.c.obj
[27/181] Building C object zephyr/arch/arch/arm/core/aarch32/cortex_m/cmse/CMakeFiles/arch__arm__core__aarch32__cortex_m__cmse.dir/arm_core_cmse.c.obj
[28/181] Building ASM object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/fault_s.S.obj
[29/181] Building C object zephyr/arch/common/CMakeFiles/isr_tables.dir/isr_tables.c.obj
[30/181] Generating linker_zephyr_pre1.cmd
[31/181] Linking C static library zephyr\arch\arch\arm\core\aarch32\libarch__arm__core__aarch32.a
[32/181] Building C object zephyr/arch/arch/arm/core/aarch32/mpu/CMakeFiles/arch__arm__core__aarch32__mpu.dir/arm_mpu.c.obj
[33/181] Building C object zephyr/arch/arch/arm/core/aarch32/mpu/CMakeFiles/arch__arm__core__aarch32__mpu.dir/arm_core_mpu.c.obj
[34/181] Linking C static library zephyr\arch\arch\arm\core\aarch32\cortex_m\cmse\libarch__arm__core__aarch32__cortex_m__cmse.a
[35/181] Generating ../../../include/generated/libc/minimal/strerror_table.h
[36/181] Building C object zephyr/soc/arm/common/cortex_m/CMakeFiles/soc__arm__common__cortex_m.dir/arm_mpu_regions.c.obj
[37/181] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/strtol.c.obj
[38/181] Building C object zephyr/boards/arm/thingy53_nrf5340/CMakeFiles/boards__arm__thingy53_nrf5340.dir/board.c.obj
[39/181] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/atoi.c.obj
[40/181] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/abort.c.obj
[41/181] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/strtoul.c.obj
[42/181] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/strtoull.c.obj
[43/181] Linking C static library zephyr\arch\common\libisr_tables.a
[44/181] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/bsearch.c.obj
[45/181] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/strtoll.c.obj
[46/181] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/string/strerror.c.obj
[47/181] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/malloc.c.obj
[48/181] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/qsort.c.obj
[49/181] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/string/strncasecmp.c.obj
[50/181] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/exit.c.obj
[51/181] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/string/strspn.c.obj
[52/181] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/string/string.c.obj
[53/181] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdout/sprintf.c.obj
[54/181] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdout/stdout_console.c.obj
[55/181] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/string/strstr.c.obj
[56/181] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/math/sqrt.c.obj
[57/181] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/math/sqrtf.c.obj
[58/181] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/time/gmtime.c.obj
[59/181] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdout/fprintf.c.obj
[60/181] Linking C static library zephyr\arch\arch\arm\core\aarch32\cortex_m\libarch__arm__core__aarch32__cortex_m.a
[61/181] Linking C static library zephyr\boards\arm\thingy53_nrf5340\libboards__arm__thingy53_nrf5340.a
[62/181] Linking C static library zephyr\arch\arch\arm\core\aarch32\mpu\libarch__arm__core__aarch32__mpu.a
[63/181] Linking C static library zephyr\soc\arm\common\cortex_m\libsoc__arm__common__cortex_m.a
[64/181] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/crc7_sw.c.obj
[65/181] Building C object CMakeFiles/app.dir/src/main.c.obj
FAILED: CMakeFiles/app.dir/src/main.c.obj 
C:\ncs\toolchains\v2.2.0\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -DKERNEL -DNRF5340_XXAA_APPLICATION -DNRF_SKIP_FICR_NS_COPY_TO_RAM -DUSE_PARTITION_MANAGER=1 -D__PROGRAM_START -D__ZEPHYR__=1 -IC:/ncs/v2.2.0/zephyr/include -Izephyr/include/generated -IC:/ncs/v2.2.0/zephyr/soc/arm/nordic_nrf/nrf53 -IC:/ncs/v2.2.0/zephyr/soc/arm/nordic_nrf/common/. -IC:/ncs/v2.2.0/nrf/include -IC:/ncs/v2.2.0/nrf/tests/include -IC:/ncs/v2.2.0/modules/hal/cmsis/CMSIS/Core/Include -IC:/ncs/v2.2.0/modules/hal/nordic/nrfx -IC:/ncs/v2.2.0/modules/hal/nordic/nrfx/drivers/include -IC:/ncs/v2.2.0/modules/hal/nordic/nrfx/mdk -IC:/ncs/v2.2.0/zephyr/modules/hal_nordic/nrfx/. -isystem C:/ncs/v2.2.0/zephyr/lib/libc/minimal/include -isystem c:/ncs/toolchains/v2.2.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/include -isystem c:/ncs/toolchains/v2.2.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/include-fixed -isystem C:/ncs/v2.2.0/nrfxlib/crypto/nrf_cc312_platform/include -fno-strict-aliasing -Os -imacros C:/Users/cirincione/nordic/spi_fujitsu_fram/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m33 -mthumb -mabi=aapcs -mfp16-format=ieee --sysroot=C:/ncs/toolchains/v2.2.0/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros C:/ncs/v2.2.0/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-pic -fno-pie -fno-asynchronous-unwind-tables -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -fmacro-prefix-map=C:/Users/cirincione/nordic/spi_fujitsu_fram=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/ncs/v2.2.0/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/ncs/v2.2.0=WEST_TOPDIR -ffunction-sections -fdata-sections -std=c99 -nostdinc -MD -MT CMakeFiles/app.dir/src/main.c.obj -MF CMakeFiles\app.dir\src\main.c.obj.d -o CMakeFiles/app.dir/src/main.c.obj -c ../src/main.c
In file included from C:\ncs\v2.2.0\zephyr\include\zephyr\toolchain\gcc.h:88,
                 from C:\ncs\v2.2.0\zephyr\include\zephyr\toolchain.h:50,
                 from C:\ncs\v2.2.0\zephyr\include\zephyr\sys\errno_private.h:10,
                 from C:\ncs\v2.2.0\zephyr\lib\libc\minimal\include\errno.h:32,
                 from c:\Users\cirincione\nordic\spi_fujitsu_fram\src\main.c:7:
../src/main.c: In function &amp;#39;main&amp;#39;:
C:\ncs\v2.2.0\zephyr\include\zephyr\device.h:83:41: error: &amp;#39;__device_dts_ord_DT_N_ALIAS_spi_1_ORD&amp;#39; undeclared (first use in this function)
   83 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
      |                                         ^~~~~~~~~
C:\ncs\v2.2.0\zephyr\include\zephyr\device.h:209:37: note: in expansion of macro &amp;#39;DEVICE_NAME_GET&amp;#39;
  209 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_ID(node_id))
      |                                     ^~~~~~~~~~~~~~~
C:\ncs\v2.2.0\zephyr\include\zephyr\device.h:226:34: note: in expansion of macro &amp;#39;DEVICE_DT_NAME_GET&amp;#39;
  226 | #define DEVICE_DT_GET(node_id) (&amp;amp;DEVICE_DT_NAME_GET(node_id))
      |                                  ^~~~~~~~~~~~~~~~~~
c:\Users\cirincione\nordic\spi_fujitsu_fram\src\main.c:153:15: note: in expansion of macro &amp;#39;DEVICE_DT_GET&amp;#39;
  153 |         spi = DEVICE_DT_GET(DT_ALIAS(spi_1));
      |               ^~~~~~~~~~~~~
C:\ncs\v2.2.0\zephyr\include\zephyr\device.h:83:41: note: each undeclared identifier is reported only once for each function it appears in
   83 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
      |                                         ^~~~~~~~~
C:\ncs\v2.2.0\zephyr\include\zephyr\device.h:209:37: note: in expansion of macro &amp;#39;DEVICE_NAME_GET&amp;#39;
  209 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_ID(node_id))
      |                                     ^~~~~~~~~~~~~~~
C:\ncs\v2.2.0\zephyr\include\zephyr\device.h:226:34: note: in expansion of macro &amp;#39;DEVICE_DT_NAME_GET&amp;#39;
  226 | #define DEVICE_DT_GET(node_id) (&amp;amp;DEVICE_DT_NAME_GET(node_id))
      |                                  ^~~~~~~~~~~~~~~~~~
c:\Users\cirincione\nordic\spi_fujitsu_fram\src\main.c:153:15: note: in expansion of macro &amp;#39;DEVICE_DT_GET&amp;#39;
  153 |         spi = DEVICE_DT_GET(DT_ALIAS(spi_1));
      |               ^~~~~~~~~~~~~
[66/181] Linking C static library zephyr\lib\libc\minimal\liblib__libc__minimal.a
[67/181] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/crc8_sw.c.obj
[68/181] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/crc32_sw.c.obj
[69/181] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/crc16_sw.c.obj
[70/181] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/cbprintf_packaged.c.obj
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: &amp;#39;C:\ncs\toolchains\v2.2.0\opt\bin\cmake.EXE&amp;#39; --build &amp;#39;c:\Users\cirincione\nordic\spi_fujitsu_fram\build&amp;#39;

 *  The terminal process terminated with exit code: 1. 
 *  Terminal will be reused by tasks, press any key to close it. &lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Also in this case the&amp;nbsp;issue seems to be on undeclarated object.&lt;/p&gt;
&lt;p&gt;How is possible that a sample code included into the SDK&amp;nbsp;release does not compile?&amp;nbsp;what can I ever do wrong?&lt;/p&gt;
&lt;p&gt;Many Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>