<?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>Issue with SPI4 RX buffer - always 0xFF data</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/124523/issue-with-spi4-rx-buffer---always-0xff-data</link><description>Hi, 
 I got strange behavior of the SPI4 nrfx driver on nRF5340 (using nRF SDK v2.6.1 non-secure build with BLE enabled on NET core). Namely, every time I try to receive bytes from external MEMS, the RX buffer contain a 0xFF value. The external device</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 22 Sep 2025 12:01:47 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/124523/issue-with-spi4-rx-buffer---always-0xff-data" /><item><title>RE: Issue with SPI4 RX buffer - always 0xFF data</title><link>https://devzone.nordicsemi.com/thread/549432?ContentTypeID=1</link><pubDate>Mon, 22 Sep 2025 12:01:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2131809a-ddb6-473a-b38d-83403f574f32</guid><dc:creator>Michal Mrowiec</dc:creator><description>&lt;p&gt;I checked dts in build/zephyr and in build/hci_ipc/zephyr also and there is no assignment for P0.10 except of SPI4.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue with SPI4 RX buffer - always 0xFF data</title><link>https://devzone.nordicsemi.com/thread/549419?ContentTypeID=1</link><pubDate>Mon, 22 Sep 2025 11:31:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d45bb1f8-9cd7-4508-893d-f8544410afe5</guid><dc:creator>Michal Mrowiec</dc:creator><description>&lt;p&gt;So how to change these, if I have already written an overlay for network core UART?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue with SPI4 RX buffer - always 0xFF data</title><link>https://devzone.nordicsemi.com/thread/549411?ContentTypeID=1</link><pubDate>Mon, 22 Sep 2025 11:03:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:90755d95-0e55-4f8b-a863-f8947b845ee9</guid><dc:creator>Turbo J</dc:creator><description>&lt;p&gt;Triple check the finished dts in build/zephyr, a few GPIOs are assigned to the network core by default.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue with SPI4 RX buffer - always 0xFF data</title><link>https://devzone.nordicsemi.com/thread/549408?ContentTypeID=1</link><pubDate>Mon, 22 Sep 2025 10:55:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a13bd57d-1e14-4114-877f-511a3f27291c</guid><dc:creator>Michal Mrowiec</dc:creator><description>&lt;p&gt;I had a few approaches to MEMS with DT, but nothing work as expected, full of bugs and no intuitive. I prefer to use nrfx drivers.&lt;/p&gt;
&lt;p&gt;This code was working without issue on logic analyzer, one byte transferred and one received.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I wrote clearly, that I checked it with IRQs and nothing changed for better.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue with SPI4 RX buffer - always 0xFF data</title><link>https://devzone.nordicsemi.com/thread/549402?ContentTypeID=1</link><pubDate>Mon, 22 Sep 2025 09:50:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:85d03dcf-0e0d-4038-b18d-884552fef95a</guid><dc:creator>Turbo J</dc:creator><description>&lt;p&gt;The NCS SDK ships quite a few drivers for MEMS devices already, I strongly recommend using those if available. Requires you to learn how DT works.&lt;/p&gt;
&lt;p&gt;Your code does not look functional to me at all. Look into the datasheet of the MEMS device how an SPI read transaction is supposed to look like.&lt;/p&gt;
&lt;p&gt;No idea why this is supposed to look&amp;nbsp; &amp;quot;correct&amp;quot; in the LA output, there should be only one byte transferred.&lt;/p&gt;
&lt;p&gt;The Zephyr SPI drivers do use interrupt mode and may cause problems with your code that tries to work around them for some reason. Note that your DT overlay turns them ON for SPIM4.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;EDIT: Disregard, the small code window and the line similarity was hiding the fact that you called&amp;nbsp;&lt;code&gt;nrfx_spim_xfer()&lt;/code&gt; &lt;em&gt;twice&lt;/em&gt;.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>