<?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>NRF 5340 spi4 communication, SDK 3.0.1</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/123096/nrf-5340-spi4-communication-sdk-3-0-1</link><description>Hello, 
 I am trying to send and receive data from an external slave sensor using the NRF5340. For debugging purposes, I have connected the NRF5340 to my PC via UART. 
 
 To get to the point, the problem I&amp;#39;m facing is that the spi_transceive() function</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 28 Jul 2025 06:50:27 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/123096/nrf-5340-spi4-communication-sdk-3-0-1" /><item><title>RE: NRF 5340 spi4 communication, SDK 3.0.1</title><link>https://devzone.nordicsemi.com/thread/543682?ContentTypeID=1</link><pubDate>Mon, 28 Jul 2025 06:50:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2076b4d3-9483-439a-be8c-a54de97279d9</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Dear&amp;nbsp;&lt;span&gt;Minseok Kim,&lt;/span&gt;&lt;/p&gt;
[quote user="gwan0624"]However, even though I want to use 16-bit SPI, I found that using &lt;code&gt;SPI_WORD_SET(8)&lt;/code&gt; instead of &lt;code&gt;SPI_WORD_SET(16)&lt;/code&gt; seems to work without any problems. When I use two 8-bit buffers instead of one 16-bit buffer, it appears to generate a 16-bit clock signal.[/quote]
&lt;p&gt;&lt;span&gt;That explains it.The SPI HW does not support 16 bit operation so it will not work. However,&amp;nbsp;spi_transceive() should have returned with -EINVAL with this word configuration:&amp;nbsp;&lt;a href="https://github.com/zephyrproject-rtos/zephyr/blob/6e3a1fda493a63806a315f56b57959ba57a2c9ba/drivers/spi/spi_nrfx_spim.c#L325"&gt;https://github.com/zephyrproject-rtos/zephyr/blob/6e3a1fda493a63806a315f56b57959ba57a2c9ba/drivers/spi/spi_nrfx_spim.c#L325&lt;/a&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
[quote user="gwan0624"]With &lt;code&gt;SPI_WORD_SET(8)&lt;/code&gt; fixed, it seems that using a single 8-bit buffer generates an 8-bit clock signal, while using two 8-bit buffers generates a 16-bit clock signal. Is this the expected behavior?[/quote]
&lt;p&gt;Yes, the 8 bit width does not limit how long a continuous transfer can be.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span&gt;Vidar&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF 5340 spi4 communication, SDK 3.0.1</title><link>https://devzone.nordicsemi.com/thread/543670?ContentTypeID=1</link><pubDate>Mon, 28 Jul 2025 00:07:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7d9d4ee5-f134-4a05-ad46-5fcb7c224aab</guid><dc:creator>gwan0624</dc:creator><description>&lt;p&gt;Dear Vidar,&lt;/p&gt;
&lt;p&gt;As you suggested, I tried setting the MISO pin to pull-up, but the issue persists.&lt;/p&gt;
&lt;p&gt;However, even though I want to use 16-bit SPI, I found that using &lt;code&gt;SPI_WORD_SET(8)&lt;/code&gt; instead of &lt;code&gt;SPI_WORD_SET(16)&lt;/code&gt; seems to work without any problems. When I use two 8-bit buffers instead of one 16-bit buffer, it appears to generate a 16-bit clock signal.&lt;/p&gt;
&lt;p&gt;With &lt;code&gt;SPI_WORD_SET(8)&lt;/code&gt; fixed, it seems that using a single 8-bit buffer generates an 8-bit clock signal, while using two 8-bit buffers generates a 16-bit clock signal. Is this the expected behavior?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;&lt;br /&gt;Minseok Kim&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF 5340 spi4 communication, SDK 3.0.1</title><link>https://devzone.nordicsemi.com/thread/543100?ContentTypeID=1</link><pubDate>Tue, 22 Jul 2025 06:53:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:68574f1a-70c9-4e3a-b276-49a209caf899</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Please try&amp;nbsp;enabling the internal pull up on MISO (&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/113908/unable-to-pull-spi-miso-line-down-via-device-tree-configuration"&gt;Unable to pull SPI MISO line down via device tree configuration&lt;/a&gt;&amp;nbsp;). This may help if the problem is that the slave is not driving the MISO signal after the CS has been asserted.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Bes regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Vidar&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>