<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://test-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 configuration problem</title><link>https://test-devzone.nordicsemi.com/f/nordic-q-a/85639/nrf5340-spi-configuration-problem</link><description>I am having the same problem as in 
 
 Case ID: 244142 
 
 devzone.nordicsemi.com/.../nrf52840_dk-spi-configuration 
 I am using nRF5340. 
 The problem I&amp;#39;m facing is that when i hook up my logic analyzer it shows no activity except for the SCK/clock line</description><dc:language>en-US</dc:language><generator>Telligent Community 13 Non-Production</generator><lastBuildDate>Mon, 13 Jun 2022 17:01:35 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://test-devzone.nordicsemi.com/f/nordic-q-a/85639/nrf5340-spi-configuration-problem" /><item><title>RE: nrf5340 SPI configuration problem</title><link>https://test-devzone.nordicsemi.com/thread/372215?ContentTypeID=1</link><pubDate>Mon, 13 Jun 2022 17:01:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fd98a9cc-0fac-4ec7-8a37-dcfe19cabdcc</guid><dc:creator>user107188</dc:creator><description>&lt;p&gt;The problem had been solved.&amp;nbsp; You may close this ticket now.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340 SPI configuration problem</title><link>https://test-devzone.nordicsemi.com/thread/357766?ContentTypeID=1</link><pubDate>Fri, 11 Mar 2022 22:56:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b040b120-d958-4249-8443-1918e1d28f05</guid><dc:creator>user107188</dc:creator><description>&lt;p&gt;I wrote a sw bitbanging version of SPI driver using GPIO pins and it is faster the Zephyr SPI driver.&amp;nbsp; 62 uS vs 102 uS, so Zephyr SPI has problem.&amp;nbsp; It just can&amp;#39;t be slower than sw bitbanging.&lt;img alt=" " src="https://test-devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Screen-Shot-2022_2D00_03_2D00_11-at-2.52.02-PM.png" /&gt;&lt;img alt=" " src="https://test-devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/1460.Screen-Shot-2022_2D00_03_2D00_10-at-2.44.49-PM.png" /&gt;&amp;nbsp; &amp;lt;---- This is Zephyr SPI.&amp;nbsp; It takes 102 uS.&amp;nbsp; Slower than sw bigbanging using GPIO.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340 SPI configuration problem</title><link>https://test-devzone.nordicsemi.com/thread/357512?ContentTypeID=1</link><pubDate>Thu, 10 Mar 2022 22:50:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3ec22c0c-3b23-425b-a9ec-823415a61182</guid><dc:creator>user107188</dc:creator><description>&lt;p&gt;Hello&amp;nbsp;&lt;a href="https://test-devzone.nordicsemi.com/members/oivind"&gt;&amp;Oslash;ivind&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;The SPI works, but it is a bit slow as indicated by the timing of the signals on the SPI bus.&amp;nbsp; &amp;nbsp;In 101uS between the falling edge and rising edge of CS, almost 60uS waiting time after the slave had finished putting data on the bus.&amp;nbsp; &amp;nbsp;There seems to be room for optimization in Zephyr SPI code.&lt;img alt=" " src="https://test-devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/Screen-Shot-2022_2D00_03_2D00_10-at-2.44.49-PM.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340 SPI configuration problem</title><link>https://test-devzone.nordicsemi.com/thread/357436?ContentTypeID=1</link><pubDate>Thu, 10 Mar 2022 14:13:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:237577c6-961b-4dd6-bccb-8887b7ba2e22</guid><dc:creator>user81283</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The SPI is working without issues now?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340 SPI configuration problem</title><link>https://test-devzone.nordicsemi.com/thread/357299?ContentTypeID=1</link><pubDate>Thu, 10 Mar 2022 02:37:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8517b702-5276-4352-8403-db2a74abfcaf</guid><dc:creator>user107188</dc:creator><description>&lt;p&gt;Get SPI Clock working.&amp;nbsp; No problem at all now.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340 SPI configuration problem</title><link>https://test-devzone.nordicsemi.com/thread/357298?ContentTypeID=1</link><pubDate>Thu, 10 Mar 2022 02:37:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:efe2120f-3508-47f7-a433-2112e6ee63b5</guid><dc:creator>user107188</dc:creator><description>&lt;p&gt;&lt;img alt=" " src="https://test-devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/Screen-Shot-2022_2D00_03_2D00_09-at-6.36.34-PM.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340 SPI configuration problem</title><link>https://test-devzone.nordicsemi.com/thread/357297?ContentTypeID=1</link><pubDate>Thu, 10 Mar 2022 02:13:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:02acfb79-e4cb-4533-9fb7-6de228adcdda</guid><dc:creator>user107188</dc:creator><description>&lt;p&gt;Now I get the CS working, but not the SPI clock.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;struct spi_cs_control spi_cs = {
	.gpio_dev = NULL,
	.gpio_pin = 14,
	.gpio_dt_flags = GPIO_ACTIVE_LOW,
	.delay = 0,
};

&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340 SPI configuration problem</title><link>https://test-devzone.nordicsemi.com/thread/357296?ContentTypeID=1</link><pubDate>Thu, 10 Mar 2022 02:11:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2faf1a3e-a4cf-4000-ab2b-31d974212e23</guid><dc:creator>user107188</dc:creator><description>&lt;p&gt;&lt;img alt=" " src="https://test-devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/Screen-Shot-2022_2D00_03_2D00_09-at-6.03.33-PM.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340 SPI configuration problem</title><link>https://test-devzone.nordicsemi.com/thread/357286?ContentTypeID=1</link><pubDate>Wed, 09 Mar 2022 23:19:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:000531d1-37df-4d7e-843f-02a1dabc5be0</guid><dc:creator>user107188</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;
// CS is pin 14 of GPIO port 1
struct spi_cs_control spi_cs = {
	.gpio_dev = NULL,
	.gpio_pin = 14,
	.gpio_dt_flags = GPIO_ACTIVE_HIGH,
	.delay = 0,
};

// and the spi_cs control is used in the SPI config  .cs = &amp;amp;spi_cs,
static const struct spi_config spi_cfg = {
	.operation = SPI_WORD_SET(8) | SPI_TRANSFER_MSB |
		     SPI_MODE_CPOL | SPI_MODE_CPHA | SPI_OP_MODE_MASTER,
	.frequency = 4000000,
	.slave = 0,
	.cs = &amp;amp;spi_cs,
};


// spi_cs.gpio_dev is initilized in spi_init
static void spi_init(void)
{
    .....
	spi_cs.gpio_dev = device_get_binding(&amp;quot;GPIO_1&amp;quot;);
	
	.....
	
}



but debugging information shows ss_pin = 255
Something wrong !!!!&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340 SPI configuration problem</title><link>https://test-devzone.nordicsemi.com/thread/357285?ContentTypeID=1</link><pubDate>Wed, 09 Mar 2022 23:03:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7a63963f-1e6d-4f42-9a90-38fa4be6e9eb</guid><dc:creator>user107188</dc:creator><description>&lt;p&gt;Dumping debugging information showing the SS_PIN is 255.&amp;nbsp; &amp;nbsp;Something is no right.&amp;nbsp; &amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340 SPI configuration problem</title><link>https://test-devzone.nordicsemi.com/thread/357284?ContentTypeID=1</link><pubDate>Wed, 09 Mar 2022 23:00:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:34001add-2844-4b03-9947-a45d0ba61bdb</guid><dc:creator>user107188</dc:creator><description>&lt;p&gt;&lt;img alt=" " src="https://test-devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/Screen-Shot-2022_2D00_03_2D00_09-at-2.57.17-PM.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>