<?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 slave doesnt seem to receive</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/118820/nrf5340-spi-slave-doesnt-seem-to-receive</link><description>Hi, 
 I have ported my already working nRF52840 SPI slave code to a nRF5340, but it doesnt seem to receive any data. I have verified the CS, SCK and MOSI signals, but no MISO from nRF5340. 
 
 I get &amp;#39;SPI slave ready&amp;#39; as a result of invoking spi_slave_init</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 25 Feb 2025 08:52:59 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/118820/nrf5340-spi-slave-doesnt-seem-to-receive" /><item><title>RE: nRF5340 SPI slave doesnt seem to receive</title><link>https://devzone.nordicsemi.com/thread/524514?ContentTypeID=1</link><pubDate>Tue, 25 Feb 2025 08:52:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ee0e1a9f-099c-4d08-83b2-7ad0cb15cdf9</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Can you at least make sure it works without TF-M?&lt;/p&gt;
&lt;p&gt;The overlay you refer to , what is the name of that file?&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SPI slave doesnt seem to receive</title><link>https://devzone.nordicsemi.com/thread/524484?ContentTypeID=1</link><pubDate>Tue, 25 Feb 2025 05:26:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3e5cf6e5-c936-4cfb-b38d-015b50850369</guid><dc:creator>kaushalyasat</dc:creator><description>&lt;p&gt;Hi Kenneth,&lt;/p&gt;
&lt;p&gt;Yes we use NS+TF-M. When I add &amp;#39;&lt;span&gt;&amp;nbsp;CONFIG_TFM_LOG_LEVEL_SILENCE=y&lt;/span&gt;&amp;#39; to my prj.conf, I get&amp;nbsp;&lt;/p&gt;
&lt;p&gt;d:/Projects/nrf/zm2hostradiofw/prj.conf:89: warning: ignoring malformed line &amp;#39; CONFIG_TFM_LOG_LEVEL_SILENCE=y&amp;#39;&lt;/p&gt;
&lt;p&gt;It seems I have not built TF-M with my application. So I added&amp;nbsp;CONFIG_BUILD_WITH_TFM=y and then the project got built, but then the app doesnt seem to run. (I have disabled UART1 from my overlay as explained in&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-2.9.0/page/nrf/security/tfm.html#building"&gt;https://docs.nordicsemi.com/bundle/ncs-2.9.0/page/nrf/security/tfm.html#building&lt;/a&gt;)&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Apparently TF-M uses UART1. I have tried assigning different pins to the UART1 in my overlay as follows.&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;uart1_default:&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;uart1_default&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;group1&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;psels&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &amp;lt;&lt;/span&gt;&lt;span&gt;NRF_PSEL&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;UART_TX&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;5&lt;/span&gt;&lt;span&gt;)&amp;gt;,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span&gt;NRF_PSEL&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;UART_RTS&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;11&lt;/span&gt;&lt;span&gt;)&amp;gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; };&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;group2&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;psels&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &amp;lt;&lt;/span&gt;&lt;span&gt;NRF_PSEL&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;UART_RX&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;)&amp;gt;,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span&gt;NRF_PSEL&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;UART_CTS&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;10&lt;/span&gt;&lt;span&gt;)&amp;gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;bias-pull-up&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; };&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; };&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;uart1_sleep:&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;uart1_sleep&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;group1&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;psels&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &amp;lt;&lt;/span&gt;&lt;span&gt;NRF_PSEL&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;UART_TX&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;5&lt;/span&gt;&lt;span&gt;)&amp;gt;,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span&gt;NRF_PSEL&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;UART_RX&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;)&amp;gt;,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span&gt;NRF_PSEL&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;UART_RTS&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;11&lt;/span&gt;&lt;span&gt;)&amp;gt;,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span&gt;NRF_PSEL&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;UART_CTS&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;10&lt;/span&gt;&lt;span&gt;)&amp;gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;low-power-enable&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; };&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; };&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;But still P0.01 doesnt seem to work for SPI slave.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;My time limit for this project has almost finished. So any help is much appreciated.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;Kaushalya&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SPI slave doesnt seem to receive</title><link>https://devzone.nordicsemi.com/thread/523953?ContentTypeID=1</link><pubDate>Thu, 20 Feb 2025 17:10:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dfc5665b-9a7f-4898-be8e-f13c832b2a9a</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I notice you are mentioning P1_NS, does this mean you are working with non-secure and have TF-M? If yes, try to set&amp;nbsp;CONFIG_TFM_LOG_LEVEL_SILENCE=y, ref:&lt;br /&gt;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-2.9.0/page/nrf/security/tfm.html#building"&gt;https://docs.nordicsemi.com/bundle/ncs-2.9.0/page/nrf/security/tfm.html#building&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SPI slave doesnt seem to receive</title><link>https://devzone.nordicsemi.com/thread/523787?ContentTypeID=1</link><pubDate>Thu, 20 Feb 2025 01:07:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:867c21b0-14a2-457d-bf25-576221fc5359</guid><dc:creator>kaushalyasat</dc:creator><description>&lt;p&gt;Hi Kenneth,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Yes uart1 was using it, but I had disabled uart1 in my overlay file. However I tried to reassign different pins to uart1 as in this overlay file.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/8306.zmhostradio.overlay"&gt;devzone.nordicsemi.com/.../8306.zmhostradio.overlay&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Also I assigned gpio1, 1 as led3 under leds node and tried to drive it.&lt;/p&gt;
&lt;p&gt;I tried like&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;	ret = dk_leds_init();
	if (ret) {
		LOG_ERR(&amp;quot;Could not initialize leds, err code: %d&amp;quot;, ret);
		goto end;
	}
	dk_set_led_on(DK_LED4);
	dk_set_led_off(DK_LED4);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;and also&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#define LED3_NODE DT_ALIAS(led3)
	int ret;
	
	static const struct gpio_dt_spec gpio11 = GPIO_DT_SPEC_GET(LED3_NODE, gpios);

	if (!gpio_is_ready_dt(&amp;amp;gpio11)) {
		return 0;
	}

	ret = gpio_pin_configure_dt(&amp;amp;gpio11, GPIO_OUTPUT_ACTIVE);
	if (ret &amp;lt; 0) {
		return 0;
	}

	ret = gpio_pin_toggle_dt(&amp;amp;gpio11);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;No matter what, gpio1, 1 doesn&amp;#39;t seem like its configured as an output.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I then tried debugging into it (both nrf connect debugger and ozone debugger) and check DIR register of P1_NS peripheral, and it shoes pin 1 as an input!!&lt;/p&gt;
&lt;p&gt;Can this pin be assigned to something in network processor? How to verify it?&lt;/p&gt;
&lt;p&gt;I checked the zephyr.dts and it seems my led3 mapping is correct.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I am totally puzzled. What is going on here??&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Kaushalya&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SPI slave doesnt seem to receive</title><link>https://devzone.nordicsemi.com/thread/523651?ContentTypeID=1</link><pubDate>Wed, 19 Feb 2025 09:36:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:167f32dd-a72a-4f98-91ce-eea0155bd730</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;It&amp;#39;s a bit hard to decode the files, but looks like uart1 might be using port1 pin1. I would start looking there. Does the pin work as a normal gpio (if you don&amp;#39;t use it for spis)?&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SPI slave doesnt seem to receive</title><link>https://devzone.nordicsemi.com/thread/523609?ContentTypeID=1</link><pubDate>Tue, 18 Feb 2025 23:42:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6f8e04c0-82b6-4c89-90ff-ce2758942ef1</guid><dc:creator>kaushalyasat</dc:creator><description>&lt;p&gt;Hi Kenneth,&lt;/p&gt;
[quote userid="2111" url="~/f/nordic-q-a/118820/nrf5340-spi-slave-doesnt-seem-to-receive/523223"]If you are using the DK maybe check out:[/quote]
&lt;p&gt;I am not using the DK. I am using UBlox NORA B126 in my board. There is no other connection to P1.1. When I debug into SPI2S init, I can see the MOSI is assigned to P1.1 and is connected to the peripheral. But when I send a byte from the master, all I receive is 0.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This is my zephyr.dts after the build with P1.1 set as MOSI.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/06736.zephyr.dts"&gt;devzone.nordicsemi.com/.../06736.zephyr.dts&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I couldn&amp;#39;t find gpio 1,1 being used in any other place. May be you can correct me if I am wrong.&lt;/p&gt;
&lt;p&gt;Can you see any clue as to why the P1.1 is not functioning as SPI2S MOSI?&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;Kaushalya&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SPI slave doesnt seem to receive</title><link>https://devzone.nordicsemi.com/thread/523223?ContentTypeID=1</link><pubDate>Mon, 17 Feb 2025 10:27:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ceb6c643-bb0c-41a5-a987-095ac944ec52</guid><dc:creator>Kenneth</dc:creator><description>[quote user="kaushalyasat"]1. Why wouldn&amp;#39;t the devicetree compiler complains when the same pins is assigned to two interfaces?[/quote]
&lt;p&gt;In an ideal world it would, but it doesn&amp;#39;t.&lt;/p&gt;
[quote user="kaushalyasat"]I verified it in zephyr.dts, but P1.1 doesnt seem to work!! Any ideas?[/quote]
&lt;p&gt;If you are using the DK maybe check out:&lt;br /&gt;&lt;a href="https://docs.nordicsemi.com/bundle/ug_nrf5340_dk/page/UG/dk/dyn_hw_flow_control.html#d10e117"&gt;https://docs.nordicsemi.com/bundle/ug_nrf5340_dk/page/UG/dk/dyn_hw_flow_control.html#d10e117&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
[quote user="kaushalyasat"]This means if I map P0.8, P0.9 etc as SPI2S, it &lt;span style="text-decoration:underline;"&gt;doesn&amp;#39;t&lt;/span&gt; need to be mapped as a peripheral? I[/quote]
&lt;p&gt;Correct.&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SPI slave doesnt seem to receive</title><link>https://devzone.nordicsemi.com/thread/523163?ContentTypeID=1</link><pubDate>Mon, 17 Feb 2025 04:06:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:77a04571-2896-4fec-83da-bf6681b2d851</guid><dc:creator>kaushalyasat</dc:creator><description>&lt;p&gt;Hi Kenneth,&lt;/p&gt;
&lt;p&gt;Thanks again. I have also noticed this but when I check from the GUI devicetree view, the&amp;nbsp;nrf-gpio-forwarder was not visible. But as you point out in the zephyr.dts I can see the relevant pins being used.&lt;/p&gt;
&lt;p&gt;1. Why wouldn&amp;#39;t the devicetree compiler complains when the same pins is assigned to two interfaces?&lt;/p&gt;
&lt;p&gt;2. I have given up using P0.8 - P0.11 and picked up other four GPIOs as SPI2S and I selected them as following.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;nCS - P0.13 &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;SCLK - P0.14&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;MOSI - P1.1&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;MISO - P0.15&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Then I could see the spi handler gets invoked but the received character was always 0x00. Then I changed MOSI to P0.18 and all was good.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Now after seeing your comment, I see P1.1 is also used in&amp;nbsp;nrf-gpio-forwarder and remapped all my spi2 related pins from&amp;nbsp;nrf-gpio-forwarder. I verified it in zephyr.dts, but P1.1 doesnt seem to work!! Any ideas?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;3.&lt;/span&gt;&lt;/p&gt;
[quote userid="2111" url="~/f/nordic-q-a/118820/nrf5340-spi-slave-doesnt-seem-to-receive/523145"]for SPIM4 and 32Mbps you need to configure MCUSEL to &amp;quot;Peripheral&amp;quot;[/quote]
&lt;p&gt;&lt;span&gt;This means if I map P0.8, P0.9 etc as SPI2S, it &lt;span style="text-decoration:underline;"&gt;doesn&amp;#39;t&lt;/span&gt; need to be mapped as a peripheral? I thought SPI2S is also acts as a peripheral. Even after SPI2S is working fully, the CNF register indicates that each pin belongs to APPCPU, not Peripheral.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Cheers,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Kaushalya&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SPI slave doesnt seem to receive</title><link>https://devzone.nordicsemi.com/thread/523145?ContentTypeID=1</link><pubDate>Sun, 16 Feb 2025 20:05:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5be6bce8-26ea-4e7a-8bd1-a96da3efdb51</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Think I found the problem. I compiled hello world for nRF5340 and looked at the zephyr.dts file in the build folder. I can find 4 pins are assigned by default to the network core, like this:&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;pre class="ui-code" data-mode="text"&gt;	gpio_fwd: nrf-gpio-forwarder {
		compatible = &amp;quot;nordic,nrf-gpio-forwarder&amp;quot;;
		status = &amp;quot;okay&amp;quot;;
		uart {
			gpios = &amp;lt; &amp;amp;gpio1 0x1 0x0 &amp;gt;, &amp;lt; &amp;amp;gpio1 0x0 0x0 &amp;gt;, &amp;lt; &amp;amp;gpio0 0xb 0x0 &amp;gt;, &amp;lt; &amp;amp;gpio0 0xa 0x0 &amp;gt;;
		};
	};&lt;/pre&gt;&lt;/div&gt;
&lt;div&gt;Amongst those are for instance P0.10 and P0.11, I assume that is the cause of your problems. To answer your questions:&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;[quote user="kaushalyasat"]I thing for the SPI to work, they should be connected to &amp;#39;Peripheral&amp;#39;, not &amp;#39;APPCPU&amp;#39;. Can you please confirm?[/quote]
&lt;p&gt;Looks like you are right, for SPIM4 and 32Mbps you need to configure MCUSEL to &amp;quot;Peripheral&amp;quot; yes.&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;
&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SPI slave doesnt seem to receive</title><link>https://devzone.nordicsemi.com/thread/522952?ContentTypeID=1</link><pubDate>Fri, 14 Feb 2025 00:45:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:655f9c05-36df-40b8-8e01-7e6a60969dd9</guid><dc:creator>kaushalyasat</dc:creator><description>&lt;p&gt;Thanks Kenneth,&lt;/p&gt;
&lt;p&gt;I figured out that SPI4 has only master mode, but what I cant figure out is why cant I assign P0.08, P0.09, P0.10 and P0.11 to any other SPI interface like SPI2. I guess if we dont use them as NFC or tracedata, they could be assigned to SPI function. Please confirm.&lt;/p&gt;
&lt;p&gt;Even after I assigned NFC as GPIO, my SPI comms were not working. I was running out of options (and time) so wired the SPI to different set of pins (P0.13, P0.14, P0.15 and P1.01) and immediately it was working!! So there is something with P0.8-P0.11 that prevented them from being used as SPI slave.&lt;/p&gt;
&lt;p&gt;Also one other observation is when I debugged it and check the MCUSEL bits of corresponding pins, I saw them as assigned to APPCPU. Even my new pin assignment is same. I thing for the SPI to work, they should be connected to &amp;#39;Peripheral&amp;#39;, not &amp;#39;APPCPU&amp;#39;. Can you please confirm?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;Kaushaya&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SPI slave doesnt seem to receive</title><link>https://devzone.nordicsemi.com/thread/522891?ContentTypeID=1</link><pubDate>Thu, 13 Feb 2025 14:16:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:19b06211-40f8-49f0-a282-ac607b7b5c2b</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;The driver should handle everything, so as long as you use the driver in the same way as the test examples that is all you need to do.&lt;/p&gt;
&lt;p&gt;The SPIM4 do not share hardware resources with other instances, ref:&lt;br /&gt;&lt;a href="https://docs.nordicsemi.com/bundle/ps_nrf5340/page/chapters/memory/appmem.html#ariaid-title3"&gt;https://docs.nordicsemi.com/bundle/ps_nrf5340/page/chapters/memory/appmem.html#ariaid-title3&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;spim3 share with spis3, twim3, twis3 and uart3:&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/0676.pastedimage1739455988763v3.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;spim4 don&amp;#39;t share with other functionality:&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/5466.pastedimage1739456026568v5.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;The pin assignment tables show recommended usage:&lt;br /&gt;&lt;a href="https://docs.nordicsemi.com/bundle/ps_nrf5340/page/chapters/pin.html"&gt;https://docs.nordicsemi.com/bundle/ps_nrf5340/page/chapters/pin.html&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If there is no specific recommended usage for a pin, then it can be used for anything. The spi pins can use those pins that have labeled qspi usage, if qspi is not used.&lt;/p&gt;
&lt;p&gt;Edit: I can see that you write P0.9 and P0.10, make sure that these pins are not configured to nfc by using:&lt;br /&gt;CONFIG_NFCT_PINS_AS_GPIOS=y (that might be deprecated, you may need to use in devicetree&amp;nbsp;&amp;amp;uicr { nfct-pins-as-gpios; };.&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SPI slave doesnt seem to receive</title><link>https://devzone.nordicsemi.com/thread/522762?ContentTypeID=1</link><pubDate>Thu, 13 Feb 2025 06:28:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c281ea68-bac5-4b0c-836b-c1700ecf4125</guid><dc:creator>kaushalyasat</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;We need some help urgently as we are stuck at this point.&lt;/p&gt;
&lt;p&gt;After refering bit more on NORA B1 user guide, I come across this.&lt;/p&gt;
&lt;p&gt;&amp;quot;SPIM4: For the fastest SPI mode, the special purpose GPIO pins are enabled using the Peripheral setting of the MCUSEL pin of the PIN_CNF register. When activated, the SPIM PSEL settings are ignored, and the dedicated pins are used. The GPIO must use the extra high drive E0E1 configuration in the DRIVE field of the PIN_CNF GPIO register.&amp;quot;&lt;/p&gt;
&lt;p&gt;I tried setting the MCUSEL to peripheral as follows.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;	#define SPIM4_SCK  NRF_GPIO_PIN_MAP(0,8)
	#define SPIM4_MOSI NRF_GPIO_PIN_MAP(0,9)
	#define SPIM4_MISO NRF_GPIO_PIN_MAP(0,10)

	nrf_gpio_cfg(SPIM4_SCK, NRF_GPIO_PIN_DIR_OUTPUT, NRF_GPIO_PIN_INPUT_DISCONNECT, NRF_GPIO_PIN_NOPULL, NRF_GPIO_PIN_H0H1, NRF_GPIO_PIN_NOSENSE);
	nrf_gpio_cfg(SPIM4_MOSI, NRF_GPIO_PIN_DIR_OUTPUT, NRF_GPIO_PIN_INPUT_DISCONNECT, NRF_GPIO_PIN_NOPULL, NRF_GPIO_PIN_H0H1, NRF_GPIO_PIN_NOSENSE);
	nrf_gpio_cfg(SPIM4_MISO, NRF_GPIO_PIN_DIR_OUTPUT, NRF_GPIO_PIN_INPUT_DISCONNECT, NRF_GPIO_PIN_NOPULL, NRF_GPIO_PIN_H0H1, NRF_GPIO_PIN_NOSENSE);

	nrf_gpio_pin_control_select(SPIM4_SCK, NRF_GPIO_PIN_SEL_PERIPHERAL);
	nrf_gpio_pin_control_select(SPIM4_MOSI, NRF_GPIO_PIN_SEL_PERIPHERAL);
	nrf_gpio_pin_control_select(SPIM4_MISO, NRF_GPIO_PIN_SEL_PERIPHERAL);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;But when I debug and check register at GPIO0-Pin 8, I see it is still set as APPMCU.&lt;/p&gt;
&lt;p&gt;So I have following questions.&lt;/p&gt;
&lt;p&gt;1. Can P0.8, P0.9 and P0.10 only be used as SPI4 in master mode, not as a slave?&lt;/p&gt;
&lt;p&gt;2. If SPI4 on the above pins can be used as a slave, how to do it?&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;Kaushalya&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SPI slave doesnt seem to receive</title><link>https://devzone.nordicsemi.com/thread/522562?ContentTypeID=1</link><pubDate>Wed, 12 Feb 2025 05:29:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ff7127f7-08e1-4812-8fc0-97cd86c43f92</guid><dc:creator>kaushalyasat</dc:creator><description>&lt;p&gt;Also I can see that there is a hardware semaphore that you got to acquire before any spi slave comms can happen. But I havent seen anywhere a sample code on how to do this. Could you also elaborate on how to do that?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SPI slave doesnt seem to receive</title><link>https://devzone.nordicsemi.com/thread/522561?ContentTypeID=1</link><pubDate>Wed, 12 Feb 2025 05:14:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1456d4a0-ea31-48ab-b2f3-aa2ba7f005da</guid><dc:creator>kaushalyasat</dc:creator><description>&lt;p&gt;We are using 4 pins of NORA B126 for SPI, which is a classified as SPIM4. This is bit confusing as we can assign these pins to any SPI function vie PSEL registers. At the moment we have assigned them to SPI2. Is there any issue here?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SPI slave doesnt seem to receive</title><link>https://devzone.nordicsemi.com/thread/522554?ContentTypeID=1</link><pubDate>Wed, 12 Feb 2025 03:00:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:79cb0df2-31fa-400a-9c33-66c56716765a</guid><dc:creator>kaushalyasat</dc:creator><description>&lt;p&gt;Hi Kenneth, I accidently closed this thread, apologies about that.&lt;/p&gt;
&lt;p&gt;I tried importing my nRF5340 overlay, but I am getting the following error, for which I cant work out the reason.&lt;/p&gt;
&lt;p&gt;fatal error: opening dependency file secure_fw\partitions\crypto\mbedcrypto\nrf_security_src\CMakeFiles\crypto_service_mbedcrypto.dir\C_\ncs\v2.9.0\modules\crypto\mbedtls\library\memory_buffer_alloc.o.d: No such file or directory&lt;/p&gt;
&lt;p&gt;My overlay file is&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/zmhostradio.overlay"&gt;devzone.nordicsemi.com/.../zmhostradio.overlay&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Can you help to sort it out?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Kaushalya&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SPI slave doesnt seem to receive</title><link>https://devzone.nordicsemi.com/thread/522417?ContentTypeID=1</link><pubDate>Tue, 11 Feb 2025 11:56:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f103f73d-21d8-497f-8e10-5f6d313b566d</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I suggest to look at the driver test examples for spi, which also include spis:&lt;br /&gt;\zephyr\tests\drivers\spi\spi_controller_peripheral\src\main.c&lt;/p&gt;
&lt;p&gt;By default I can see there is no overlay for nRF5340, but I would expect you can rename&amp;nbsp;nrf52840dk_nrf52840.overlay to&amp;nbsp;nrf5340dk_nrf5340_cpuapp.overlay, and update the pins used for spi and spis, and then it should work.&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 SPI slave doesnt seem to receive</title><link>https://devzone.nordicsemi.com/thread/522334?ContentTypeID=1</link><pubDate>Tue, 11 Feb 2025 04:49:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d945c59c-5718-4db2-9dbf-b23c9dd901f9</guid><dc:creator>kaushalyasat</dc:creator><description>&lt;p&gt;We use NORA B120 module and the SPI signals are wired as follows.&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/pastedimage1739249264255v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;The overlay file contents related to the SPI is as follows.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;pinctrl {
.
.
	spi_slave_default: spi_slave_default {
		group1 {
			psels = &amp;lt;NRF_PSEL(SPIS_SCK, 0, 8)&amp;gt;,
					&amp;lt;NRF_PSEL(SPIS_MOSI, 0, 9)&amp;gt;,
					&amp;lt;NRF_PSEL(SPIS_MISO, 0, 10)&amp;gt;,
					&amp;lt;NRF_PSEL(SPIS_CSN, 0, 11)&amp;gt;;
		};
	};
};

my_spi_slave: &amp;amp;spi2 {
	compatible = &amp;quot;nordic,nrf-spis&amp;quot;;
	status = &amp;quot;okay&amp;quot;;
	pinctrl-0 = &amp;lt;&amp;amp;spi_slave_default&amp;gt;;
	pinctrl-names = &amp;quot;default&amp;quot;;
	def-char = &amp;lt;0x00&amp;gt;;
}; &lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>