<?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>SPI api issues</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/105588/spi-api-issues</link><description>Hey All, 
 I tried to build a driver for an SPI sensor, only to receive quite a weird output: 
 
 
 
 When I try to read, it looks like it finds the proper address, but the content is 0xffff constant. 
 I&amp;#39;m using the SPI3 instance without sensor-specific</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 15 Nov 2023 21:20:00 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/105588/spi-api-issues" /><item><title>RE: SPI api issues</title><link>https://devzone.nordicsemi.com/thread/455850?ContentTypeID=1</link><pubDate>Wed, 15 Nov 2023 21:20:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:95911bbe-e393-4682-9a1f-f3ff987ac226</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;Phew - good news!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI api issues</title><link>https://devzone.nordicsemi.com/thread/455847?ContentTypeID=1</link><pubDate>Wed, 15 Nov 2023 20:55:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:527c2682-6cad-461d-aee8-40c5a7b55516</guid><dc:creator>Meh</dc:creator><description>&lt;p&gt;You were right! It looks like i need to shift all the addresses 1 bit to the left!&lt;/p&gt;
&lt;p&gt;Thank you so much :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI api issues</title><link>https://devzone.nordicsemi.com/thread/455839?ContentTypeID=1</link><pubDate>Wed, 15 Nov 2023 19:36:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dbe938dc-b753-4d02-a8fc-f9f411ea9454</guid><dc:creator>Meh</dc:creator><description>&lt;p&gt;I tried at 1MHz (all the things you saw here) - I sampled it at 4MHz due to Nyquist law&lt;/p&gt;
&lt;p&gt;Edit:&lt;/p&gt;
&lt;p&gt;Reduced CLK to 500kHz for the sake of the attempt. I get a similar example to before:&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/pastedimage1700080519678v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;LOGGER:&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/pastedimage1700080670824v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;The sampling rate of the logic analyzer - 4MHz, CLK sample 0.5MHz.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;DTS:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;pinctrl {

    spi3_default: spi3_default {
		group1 {
                nordic,drive-mode = &amp;lt;NRF_DRIVE_H0H1&amp;gt;;
		};
	};
   };

   &amp;amp;arduino_spi {
       foo: foo@0 {
           compatible = &amp;quot;adi,adxl345&amp;quot;;
           reg = &amp;lt;0&amp;gt;;
           spi-max-frequency = &amp;lt;500000&amp;gt;;
           label = &amp;quot;FOO&amp;quot;;

       };
   };&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI api issues</title><link>https://devzone.nordicsemi.com/thread/455829?ContentTypeID=1</link><pubDate>Wed, 15 Nov 2023 17:46:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d21eaf4a-6df7-4328-968b-5f796ebbdce3</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;Looks like gpio1 is ok but only at 1MHz; if you want to use 8 or 16MHz then P1 will not work.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI api issues</title><link>https://devzone.nordicsemi.com/thread/455826?ContentTypeID=1</link><pubDate>Wed, 15 Nov 2023 17:03:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:255e65ea-31c5-4d62-b528-0877b068a95c</guid><dc:creator>Meh</dc:creator><description>&lt;p&gt;So should I use spi3 even it uses pins from gpio1?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI api issues</title><link>https://devzone.nordicsemi.com/thread/455814?ContentTypeID=1</link><pubDate>Wed, 15 Nov 2023 15:37:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1a43a22a-c3a0-4a03-875e-1784b6dfb9cc</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;I would revert to the pre-pin overlay change as I now think that was working with port P1 pins and returning a value of 0x0000 which was the correct value for the command used 0x0008&amp;gt;&amp;gt;1=0x0004=&lt;span&gt;INT_STATUS_TC1&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Edit: This graph posted earlier shows that MISO was correctly&amp;nbsp;driven low after the first 16 clock cycles to return the value of 0x0000 for that&amp;nbsp;INT_STATUS_TC1 commmand&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/pastedimage1700002005275v5.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI api issues</title><link>https://devzone.nordicsemi.com/thread/455782?ContentTypeID=1</link><pubDate>Wed, 15 Nov 2023 13:48:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f90b5fb2-b068-4d84-9428-61f990b54164</guid><dc:creator>Meh</dc:creator><description>&lt;p&gt;It&amp;#39;s not it&lt;/p&gt;
&lt;p&gt;I cleaned my nrf52840 overlay to this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;pinctrl {

    spi2_default: spi2_default {
		group1 {
                nordic,drive-mode = &amp;lt;NRF_DRIVE_H0H1&amp;gt;;
		};
	};
   };
   
   



   &amp;amp;spi2 {
    status = &amp;quot;okay&amp;quot;;
    cs-gpios = &amp;lt; &amp;amp;gpio0 11 0 &amp;gt;;
       foo: foo@0 {
           compatible = &amp;quot;adi,adxl345&amp;quot;;
           reg = &amp;lt;0&amp;gt;;
           spi-max-frequency = &amp;lt;1000000&amp;gt;;
        //    duplex = &amp;lt; 0 &amp;gt;;
        //    frame-format = &amp;lt; 0 &amp;gt;;
           label = &amp;quot;FOO&amp;quot;;

       };
   };&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The output signals are:&lt;/p&gt;
&lt;p&gt;&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/pastedimage1700056087806v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;(The small CS bump is on reset)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI api issues</title><link>https://devzone.nordicsemi.com/thread/455692?ContentTypeID=1</link><pubDate>Wed, 15 Nov 2023 06:06:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5ed258e7-d741-41e5-b579-f3ac6bb071c1</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;Ah, slightly silly but we are forgetting the ~Rd/Wr bit is the lsb so the command/address CHIP_ID 0x0008 is left-shifted 1 bit &amp;lt;sigh&amp;gt;. Try this (0x0010):&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;	tx_dat[0]  = 0x00;
	tx_dat[1]  = 0x10;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;INT_STATUS_TC1 0x0004 will indeed return a reset value of 0x0000&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI api issues</title><link>https://devzone.nordicsemi.com/thread/455689?ContentTypeID=1</link><pubDate>Wed, 15 Nov 2023 05:15:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:066e0ce1-2fb8-40f0-857c-aac18449fdc5</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;Maybe post a link to the shield schematic/circuit diagram you are using; seems like there is a hardware issue here. The Analog Devices shield requires some resistors moving for SPI, not sure about others.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI api issues</title><link>https://devzone.nordicsemi.com/thread/455680?ContentTypeID=1</link><pubDate>Wed, 15 Nov 2023 01:59:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4f7cbc10-6b77-4d52-b471-f71c21ecc6f6</guid><dc:creator>Meh</dc:creator><description>&lt;p&gt;I connected the shield with jumpers, now using spi2 instead of the arudino_spi.&lt;/p&gt;
&lt;p&gt;This is my overlay rn. I verified all the connections with the devicetree overlay.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;pinctrl {

    spi2_default: spi2_default {
		group1 {
			psels = &amp;lt;NRF_PSEL(SPIM_SCK, 0, 19)&amp;gt;,
				&amp;lt;NRF_PSEL(SPIM_MOSI, 0, 20)&amp;gt;,
				&amp;lt;NRF_PSEL(SPIM_MISO, 0, 21)&amp;gt;;
                nordic,drive-mode = &amp;lt;NRF_DRIVE_H0H1&amp;gt;;
		};
	};

	spi2_sleep: spi2_sleep {
		group1 {
			psels = &amp;lt;NRF_PSEL(SPIM_SCK, 0, 19)&amp;gt;,
				&amp;lt;NRF_PSEL(SPIM_MOSI, 0, 20)&amp;gt;,
				&amp;lt;NRF_PSEL(SPIM_MISO, 0, 21)&amp;gt;;
			low-power-enable;
		};
	};

   };
   
   



   &amp;amp;spi2 {
    status = &amp;quot;okay&amp;quot;;
    cs-gpios = &amp;lt; &amp;amp;gpio0 11 0 &amp;gt;;
       foo: foo@0 {
           compatible = &amp;quot;adi,adxl345&amp;quot;;
           reg = &amp;lt;0&amp;gt;;
           spi-max-frequency = &amp;lt;1000000&amp;gt;;
        //    duplex = &amp;lt; 0 &amp;gt;;
        //    frame-format = &amp;lt; 0 &amp;gt;;
           label = &amp;quot;FOO&amp;quot;;

       };
   };&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Yet my logic signals are:&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/pastedimage1700013568907v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI api issues</title><link>https://devzone.nordicsemi.com/thread/455674?ContentTypeID=1</link><pubDate>Wed, 15 Nov 2023 01:02:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6d326edc-30c6-4b50-bb1c-a62125a723af</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;I would just patch&amp;nbsp;3 High-Drive P0 pins across for MOSI, /CS and SCLK, though SCLK is usually the main culprit; leave the existing weak P1 port pins in default input mode so you don&amp;#39;t have to cut them. Interesting the board would label P1 pins as SPI, if that is what Nordic did&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI api issues</title><link>https://devzone.nordicsemi.com/thread/455672?ContentTypeID=1</link><pubDate>Wed, 15 Nov 2023 00:56:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2f1c4822-15fe-4fe8-8501-7edc8cdf1a44</guid><dc:creator>Meh</dc:creator><description>&lt;p&gt;So, should I manually connect between the shield and the DK to use the sensor?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI api issues</title><link>https://devzone.nordicsemi.com/thread/455671?ContentTypeID=1</link><pubDate>Wed, 15 Nov 2023 00:55:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a0448966-cc92-48c6-98e9-f73c85a573ea</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;Ah, those pins are too weak for SPI; check the manual &lt;em&gt;7.1 Pin Assignments&lt;/em&gt; for pins which are not &amp;quot;Standard Drive I/O only&amp;quot; - typically use P0&lt;/p&gt;
&lt;p&gt;&lt;em&gt;38 P1.15 Digital I/O General purpose I/O Standard drive, low frequency I/O&amp;nbsp;only&lt;/em&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI api issues</title><link>https://devzone.nordicsemi.com/thread/455668?ContentTypeID=1</link><pubDate>Wed, 15 Nov 2023 00:48:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:732491a2-f263-4667-b235-190984aeec00</guid><dc:creator>Meh</dc:creator><description>&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/pastedimage1700009311246v1.png" /&gt;&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/pastedimage1700009532763v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;My pinctrl overlay changes:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;
   &amp;amp;pinctrl {
    spi3_default: spi3_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;;
                nordic,drive-mode = &amp;lt;NRF_DRIVE_H0H1&amp;gt;;
		};
		
	};

	spi3_sleep: spi3_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;
		};
	};
   };&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI api issues</title><link>https://devzone.nordicsemi.com/thread/455666?ContentTypeID=1</link><pubDate>Wed, 15 Nov 2023 00:44:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e83369e8-1b9e-460b-8c34-5f65f62e86ce</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;Can you set a breakpoint after the transmit and check the pins for H0H1? I assume the pins are available as H0H1, ie on P0 not P1&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI api issues</title><link>https://devzone.nordicsemi.com/thread/455665?ContentTypeID=1</link><pubDate>Wed, 15 Nov 2023 00:40:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f698283a-85a1-4874-bb54-0ceb286d1495</guid><dc:creator>Meh</dc:creator><description>&lt;p&gt;I added it according to this link yet it doesn&amp;#39;t appear to change anything&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI api issues</title><link>https://devzone.nordicsemi.com/thread/455664?ContentTypeID=1</link><pubDate>Wed, 15 Nov 2023 00:39:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:42d53476-b1cb-4d90-bec9-b4784738f359</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;The last link discusses this, but I&amp;#39;m not using nRFConnect so not sure; you could still add the configuration after the init using SDK code ..&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI api issues</title><link>https://devzone.nordicsemi.com/thread/455663?ContentTypeID=1</link><pubDate>Wed, 15 Nov 2023 00:36:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1a26cacf-69d4-4bf7-b5b4-cef3633035e4</guid><dc:creator>Meh</dc:creator><description>&lt;p&gt;NCS v2.2&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI api issues</title><link>https://devzone.nordicsemi.com/thread/455662?ContentTypeID=1</link><pubDate>Wed, 15 Nov 2023 00:36:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0be783fb-afed-463f-a740-545e81fb448a</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;Is this SDK 17 or nRF Connect SDK?&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/91787/how-to-define-spi-outputs-as-highdrive-h0h1-outputs-in-a-overlay-file"&gt;how-to-define-spi-outputs-as-highdrive-h0h1-outputs-in-a-overlay-file&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI api issues</title><link>https://devzone.nordicsemi.com/thread/455661?ContentTypeID=1</link><pubDate>Wed, 15 Nov 2023 00:33:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a67b572c-1357-4d8b-a093-751403d2dd2e</guid><dc:creator>Meh</dc:creator><description>&lt;p&gt;Should I add it on the overlay inside the spi3 instance?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI api issues</title><link>https://devzone.nordicsemi.com/thread/455660?ContentTypeID=1</link><pubDate>Wed, 15 Nov 2023 00:29:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:be52dfff-9722-4548-917e-c67e9e42c251</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;Have a look at this:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/86651/spi-communication-issue-software-problem/446751"&gt;spi-communication-issue-software-problem&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;To clarify: The waveforms in real life are not clean as your logic analyser shows; the trace looks like square edges on the display but a 24MHz-capable SPI Slave sees slow edges and slight jitter in the real waveform as additional edges. H0H1 reduces the effect.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI api issues</title><link>https://devzone.nordicsemi.com/thread/455659?ContentTypeID=1</link><pubDate>Wed, 15 Nov 2023 00:18:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ff739599-f5f3-4f34-9f40-5c345ff5f5c0</guid><dc:creator>Meh</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;uint16_t foo_SPI_Receive(uint8_t *pTxData, uint8_t *pRxData, uint16_t TxSize, uint16_t RxSize)
{
    int ret = 0;

const struct spi_buf tx_buf = {
      .buf = pTxData,
      .len = TxSize,
  };
  LOG_INF(&amp;quot;address being addressed is 0x%x%x\n&amp;quot;, pTxData[0], pTxData[1]);
  const struct spi_buf_set tx_buff = {
      .buffers = &amp;amp;tx_buf,
      .count = 1,
  };

  const struct spi_buf rx_buf = {
      .buf = pRxData,
      .len = RxSize,
  };
  const struct spi_buf_set rx_buff = {
      .buffers = &amp;amp;rx_buf,
      .count = 1,
  };


  ret = spi_transceive_dt(&amp;amp;dev_spi, &amp;amp;tx_buff, &amp;amp;rx_buff);
  if (ret != 0)
  {
    LOG_ERR(&amp;quot;SPI receive failed with error %d&amp;quot;, ret);
    return ret;
  }
  return ADI_ADPD_DRV_SUCCESS;
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote userid="65515" url="~/f/nordic-q-a/105588/spi-api-issues/455658"]does boosting the drive level get anything on MISO[/quote]
&lt;p&gt;Can you clarify your intention here?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I doubled the LA sampling frequency to 8MHz now when the physical and software setups are alike.&lt;/p&gt;
&lt;p&gt;1st operation&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/pastedimage1700008034675v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;2nd&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/pastedimage1700008067772v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;3rd&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/pastedimage1700008090560v3.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI api issues</title><link>https://devzone.nordicsemi.com/thread/455658?ContentTypeID=1</link><pubDate>Wed, 15 Nov 2023 00:17:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0e13be3e-efec-46a7-920a-3b0325a6f1eb</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;Sorry, I meant&amp;nbsp;&lt;em&gt;foo_SPI_Receive&lt;/em&gt;()&lt;/p&gt;
&lt;p&gt;I see you do 2 transactions, 16-bit tx then further 16-bit tx to get the 16-bit receive, should work though .. does boosting the drive level get anything on MISO?&lt;/p&gt;
&lt;p&gt;The logic analyser hides the soggy signals, whereas an oscilloscope shows the soggy edges and slow rise and fall times; that&amp;#39;s why it&amp;#39;s alwaays worth setting H0H1&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI api issues</title><link>https://devzone.nordicsemi.com/thread/455657?ContentTypeID=1</link><pubDate>Wed, 15 Nov 2023 00:02:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:05276cdf-f76e-4cd5-8958-29e05e797493</guid><dc:creator>Meh</dc:creator><description>&lt;p&gt;WDYM?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;My clock is 1Mhz exactly, haha.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Edit to respond to your edit @hmolesworth :&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;uint16_t foo_SPI_Transmit(uint8_t *pData, uint16_t Size)
{
  int ret = 0;
  const struct spi_buf tx_buf = {
      .buf = pData,
      .len = Size,
  };
  const struct spi_buf_set tx_buff = {
      .buffers = &amp;amp;tx_buf,
      .count = 1,
  };
  LOG_INF(&amp;quot;Writing to address 0x%x%x the content: 0x%x%x\n&amp;quot;, pData[0], pData[1], pData[2], pData[3]);
  ret = spi_transceive_dt(&amp;amp;dev_spi, &amp;amp;tx_buff, NULL);
  if (ret != 0)
  {
    LOG_ERR(&amp;quot;SPI transmit failed with error %d&amp;quot;, ret);
    return ret;
  }
  return ADI_ADPD_DRV_SUCCESS;
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI api issues</title><link>https://devzone.nordicsemi.com/thread/455655?ContentTypeID=1</link><pubDate>Wed, 15 Nov 2023 00:01:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:49667f64-4f2a-4f81-a0ec-661a388f517d</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;Maybe boost /CS, MOSI and SCLK outputs to high-drive H0H1 either in the init or immediately after the init if clock is above 1MHz&lt;/p&gt;
&lt;p&gt;Edit: Something funny about the clock pattern in the last trace; looks like 2 bursts of 16 clocks instead of a single burst of 32 clocks; normally the burst length is defined as the longer of tx and rx count with no gap. can you post&amp;nbsp;&lt;em&gt;foo_SPI_Transmit()&lt;/em&gt;?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>