<?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>First 4 bits received by SPIM (from SPIS) are always 1?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/86610/first-4-bits-received-by-spim-from-spis-are-always-1</link><description>I&amp;#39;m running into a weird bug where the first 4 bits received by my SPIM are always 1 - the next 64.5 bytes are all correct though... I&amp;#39;ve built 3 FWs out of provided examples. 
 
 I have a single devkit acting as a spi_slave built off the spis example</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 11 Apr 2022 20:51:18 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/86610/first-4-bits-received-by-spim-from-spis-are-always-1" /><item><title>RE: First 4 bits received by SPIM (from SPIS) are always 1?</title><link>https://devzone.nordicsemi.com/thread/362922?ContentTypeID=1</link><pubDate>Mon, 11 Apr 2022 20:51:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:695ce7aa-41bb-4e9d-a9b2-982e81f720cf</guid><dc:creator>ryerye120</dc:creator><description>&lt;p&gt;I put a breakpoint at the delay and it is getting hit but I still can&amp;#39;t see the delay over an oscilloscope which is weird.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What&amp;#39;s weirder is that the&amp;nbsp;issue exists with the bare examples too!! I&amp;#39;ve attached zips of my spis and nrfx_spim firmwares below. &lt;span&gt;&amp;nbsp;The only changes remaining are a slightly updated test string and the disabling of DCX. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Rather than sending the expected &amp;quot;nordic123456&amp;quot;, the slave device sends out &amp;quot;.ordic123456&amp;quot; where the period is NRF_LOG_HEXDUMP_INFO&amp;#39;s attempt at interpreting &amp;#39;FF&amp;#39; or &amp;#39;CE&amp;#39;. Am I not supposed to use the spis example firmware with the nrfx_spim? Surely someone must have run into this problem before.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Also at this point I&amp;#39;ve tried out multiple physical dev kits to make sure there wasn&amp;#39;t some hardware/chip specific/lemon issue.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/4087.nrfx_5F00_spim.zip"&gt;devzone.nordicsemi.com/.../4087.nrfx_5F00_spim.zip&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/6201.spis_5F00_chars.zip"&gt;devzone.nordicsemi.com/.../6201.spis_5F00_chars.zip&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;As always, thanks for your help Kenneth. I&amp;#39;m so lost hahaha -&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Ryan&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: First 4 bits received by SPIM (from SPIS) are always 1?</title><link>https://devzone.nordicsemi.com/thread/362537?ContentTypeID=1</link><pubDate>Fri, 08 Apr 2022 09:41:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:12309475-2824-4eb8-8490-cc5d6ac4c947</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Odd that the delay did not have any effect,&amp;nbsp;I suggest to continue debugging to see if you have any new observations. Maybe the delay is somehow optimized away, though you can set a breakpoint there just to confirm you are hitting the line of code. Do you see the same issues when using the nrf5 sdk examples as-is?&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: First 4 bits received by SPIM (from SPIS) are always 1?</title><link>https://devzone.nordicsemi.com/thread/362430?ContentTypeID=1</link><pubDate>Thu, 07 Apr 2022 16:27:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7058b916-9002-4a24-ab87-6b71db67d06c</guid><dc:creator>ryerye120</dc:creator><description>&lt;p&gt;Hi Kenneth,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m trying this out but it doesn&amp;#39;t seem to be changing the time between CS going low and SCK&amp;#39;s first clock cycle. I added nrf_delay.h and the delay right before&amp;nbsp;spim_xfer() (my nrfx_spim_xfer function is copied below).&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;nrfx_err_t nrfx_spim_xfer(nrfx_spim_t     const * const p_instance,
                          nrfx_spim_xfer_desc_t const * p_xfer_desc,
                          uint32_t                      flags)
{
    spim_control_block_t * p_cb = &amp;amp;m_cb[p_instance-&amp;gt;drv_inst_idx];
    NRFX_ASSERT(p_cb-&amp;gt;state != NRFX_DRV_STATE_UNINITIALIZED);
    NRFX_ASSERT(p_xfer_desc-&amp;gt;p_tx_buffer != NULL || p_xfer_desc-&amp;gt;tx_length == 0);
    NRFX_ASSERT(p_xfer_desc-&amp;gt;p_rx_buffer != NULL || p_xfer_desc-&amp;gt;rx_length == 0);
    NRFX_ASSERT(SPIM_LENGTH_VALIDATE(p_instance-&amp;gt;drv_inst_idx,
                                     p_xfer_desc-&amp;gt;rx_length,
                                     p_xfer_desc-&amp;gt;tx_length));

    nrfx_err_t err_code = NRFX_SUCCESS;

    if (p_cb-&amp;gt;transfer_in_progress)
    {
        err_code = NRFX_ERROR_BUSY;
        NRFX_LOG_WARNING(&amp;quot;Function: %s, error code: %s.&amp;quot;,
                         __func__,
                         NRFX_LOG_ERROR_STRING_GET(err_code));
        return err_code;
    }
    else
    {
        if (p_cb-&amp;gt;handler &amp;amp;&amp;amp; !(flags &amp;amp; (NRFX_SPIM_FLAG_REPEATED_XFER |
                                        NRFX_SPIM_FLAG_NO_XFER_EVT_HANDLER)))
        {
            p_cb-&amp;gt;transfer_in_progress = true;
        }
    }

    p_cb-&amp;gt;evt.xfer_desc = *p_xfer_desc;

    if (p_cb-&amp;gt;ss_pin != NRFX_SPIM_PIN_NOT_USED)
    {
#if NRFX_CHECK(NRFX_SPIM_EXTENDED_ENABLED)
        if (!p_cb-&amp;gt;use_hw_ss)
#endif
        {
            if (p_cb-&amp;gt;ss_active_high)
            {
                nrf_gpio_pin_set(p_cb-&amp;gt;ss_pin);
            }
            else
            {
                nrf_gpio_pin_clear(p_cb-&amp;gt;ss_pin);
            }
        }
    }
    
    nrf_delay_us(10);
    return spim_xfer(p_instance-&amp;gt;p_reg, p_cb,  p_xfer_desc, flags);
}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Am I doing something wrong? I tried 10us and 100us of delay and couldn&amp;#39;t observe any delay over the oscope. Is there another way to add this delay?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: First 4 bits received by SPIM (from SPIS) are always 1?</title><link>https://devzone.nordicsemi.com/thread/362230?ContentTypeID=1</link><pubDate>Thu, 07 Apr 2022 07:46:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:27c66876-8f65-4d54-8167-2a42c057a1a0</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;I can see there is no delay between CS going low and first SCK. Can you on the master SPI add a 10us delay between the two as earlier suggested, I want to see how that affect what you are seeing.&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: First 4 bits received by SPIM (from SPIS) are always 1?</title><link>https://devzone.nordicsemi.com/thread/362157?ContentTypeID=1</link><pubDate>Wed, 06 Apr 2022 16:44:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:573ae161-472f-4928-95ae-466f650370c7</guid><dc:creator>ryerye120</dc:creator><description>&lt;p&gt;Hi Kenneth,&lt;/p&gt;
&lt;p&gt;Sorry for being unclear. After some further debugging I can say that my main problem is:&lt;br /&gt;&lt;br /&gt;When I ask my spi slave to send the following 65 byte packet:&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;static uint8_t       m_tx_buf[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
                                   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
                                   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
                                   0,0,0,2,2};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;My spi master will receive:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;{8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
 0,0,0,2,2};&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;With the only difference is that the 0 index&amp;#39;s MSB is 1. I&amp;#39;ve tried out a number of different numbers in the first byte (m_tx_buf[0]) and it seems like the first 4 bits of my SPI packet always end up being something weird. E.g. if I want to send the decimal number 80 then I receive 0xd0 (instead of 0x50). If I try to send decimal127 then the master receives 0xff (instead of 0x0f). The bottom line is some values seem to confuse the SPI driver. Am I not setting m_tx_buf properly?&lt;/p&gt;
&lt;p&gt;For the send decimal 0 and receive 0x80 case:&lt;br /&gt;I probed the SCLK, CS, and MISO lines with an oscilloscope and observed that CS and SCLK behave properly (65 bytes worth of data are indeed shifted out over MISO). The odd thing is that the first bit sent over MISO is 1! Regardless of what I try to send. This means the master is reading everything in properly and the issue seems to be with the spi slave...&lt;br /&gt;&lt;br /&gt;To make things weirder I have the spi slave print out what m_tx_buf[0] is with NRF_LOG_INFO before and after each spi transaction and it is always 0 (as it should be) but again - the received first byte is 8 (which is 1000000 - meaning the msb is erroneously 1).&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;To belabor the point some more here is a screenshot of the oscilloscope with the following signals (SCLK, CS, and MISO):&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/IMG_5F00_1805.jpg" /&gt;&lt;br /&gt;&lt;br /&gt;That first bit on MISO should be 0!!&lt;br /&gt;&lt;br /&gt;Also as reference here is a copy of my spi_slave code:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;#include &amp;quot;sdk_config.h&amp;quot;
#include &amp;quot;nrf_drv_spis.h&amp;quot;
#include &amp;quot;nrf_gpio.h&amp;quot;
#include &amp;quot;boards.h&amp;quot;
#include &amp;quot;app_error.h&amp;quot;
#include &amp;lt;string.h&amp;gt;

#include &amp;quot;nrf_log.h&amp;quot;
#include &amp;quot;nrf_log_ctrl.h&amp;quot;
#include &amp;quot;nrf_log_default_backends.h&amp;quot;

#define SPIS_INSTANCE 1 /**&amp;lt; SPIS instance index. */
static const nrf_drv_spis_t spis = NRF_DRV_SPIS_INSTANCE(SPIS_INSTANCE);/**&amp;lt; SPIS instance. */

// SPI transfer buffer
static uint8_t       m_tx_buf[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
                                   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
                                   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
                                   0,0,0,2,2};


static uint8_t       m_rx_buf[sizeof(m_tx_buf) + 1];        // RX buffer.
static const uint8_t m_length = sizeof(m_tx_buf);        // Transfer length.
static uint8_t       counter = 0;


static volatile bool spis_xfer_done; /**&amp;lt; Flag used to indicate that SPIS instance completed the transfer. */


void spis_event_handler(nrf_drv_spis_event_t event)
{
    if (event.evt_type == NRF_DRV_SPIS_XFER_DONE)
    {
        spis_xfer_done = true;
        bsp_board_led_invert(BSP_BOARD_LED_2);
        NRF_LOG_INFO(&amp;quot; packet_id: %d&amp;quot;,m_tx_buf[0]);
        
    }
}

int main(void)
{
    NRF_POWER-&amp;gt;TASKS_CONSTLAT = 1;

    bsp_board_init(BSP_INIT_LEDS);

    APP_ERROR_CHECK(NRF_LOG_INIT(NULL));
    NRF_LOG_DEFAULT_BACKENDS_INIT();

    NRF_LOG_INFO(&amp;quot;SPIS example&amp;quot;);

    nrf_drv_spis_config_t spis_config = NRF_DRV_SPIS_DEFAULT_CONFIG;
    spis_config.csn_pin               = APP_SPIS_CS_PIN;
    spis_config.miso_pin              = APP_SPIS_MISO_PIN;
    spis_config.mosi_pin              = APP_SPIS_MOSI_PIN;
    spis_config.sck_pin               = APP_SPIS_SCK_PIN;

    // APP_SPIS_CS_PIN 31
    // APP_SPIS_MOSI_PIN 29
    // APP_SPIS_MISO_PIN 30
    // APP_SPIS_SCK_PIN 26

    APP_ERROR_CHECK(nrf_drv_spis_init(&amp;amp;spis, &amp;amp;spis_config, spis_event_handler));
    bsp_board_led_invert(BSP_BOARD_LED_0);
    while (1)
    {
        NRF_LOG_INFO(&amp;quot;before memset - packet_id: %d&amp;quot;,m_tx_buf[0]);
        memset(m_rx_buf, 0, m_length);
        spis_xfer_done = false;

        APP_ERROR_CHECK(nrf_drv_spis_buffers_set(&amp;amp;spis, m_tx_buf, m_length, m_rx_buf, m_length));
        NRF_LOG_INFO(&amp;quot; packet_id after check: %d&amp;quot;,m_tx_buf[0]);

        while (!spis_xfer_done)
        {
            __WFE();
        }

        NRF_LOG_FLUSH();

        bsp_board_led_invert(BSP_BOARD_LED_1);
    }
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you so much for your help. I&amp;#39;m so confused about how this can be happening...&lt;/p&gt;
&lt;p&gt;Ryan&lt;br /&gt;&lt;br /&gt;p.s. it seems like I&amp;#39;m not the only one to have dealt with this error - unfortunately, they stopped responding - Furthermore this post is for the 52832 so it may be completely irrelevant :&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/28265/spis-communication-corrupted"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/28265/spis-communication-corrupted&lt;br /&gt;&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: First 4 bits received by SPIM (from SPIS) are always 1?</title><link>https://devzone.nordicsemi.com/thread/361973?ContentTypeID=1</link><pubDate>Wed, 06 Apr 2022 07:45:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bf349fcf-de52-4305-9877-3591257ee057</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;I suggest continue debugging, not sure if I understand your current problem. Think it will be better if you for instance send a fixed tx_buffer and for instance share a logic analyzer trace of the first byte and describe what you expect to see.&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: First 4 bits received by SPIM (from SPIS) are always 1?</title><link>https://devzone.nordicsemi.com/thread/361921?ContentTypeID=1</link><pubDate>Tue, 05 Apr 2022 20:55:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ec923c55-9b67-43a3-87d1-9ecd1403081b</guid><dc:creator>ryerye120</dc:creator><description>&lt;p&gt;Hi Kenneth,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So I&amp;#39;ve been a little dumb. Incrementing an 8 bit number from 128 to 255 and wrapping just means the MSB is always 1. So my biggest problem is not that the first 4 bits are always 1 ... just the first bit.&lt;br /&gt;&lt;br /&gt;Regardless, I tried adding the delay and that didn&amp;#39;t seem to make a difference, unfortunately.&lt;br /&gt;&lt;br /&gt;I did manage to get my hands on an oscope and probed the SS, MISO, and SCLK lines. The MISO is indeed first sending a 1 (which corresponds to the MSB). CS and SCLK seemed just fine as well. Is there some config bit that I&amp;#39;m ignoring that always sets the first bit to 1? I&amp;#39;ve copied my short spi_slave code below in case you have any suggestions.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Lastly, I confirmed that within a single spi transaction (CS going low and then high again), 520 clock cycles occur over miso. This means I&amp;#39;m definitely sending the proper amount of bytes (65*8 = 520? yes!)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you so much for your help.&lt;/p&gt;
&lt;p&gt;Kindest regards,&lt;/p&gt;
&lt;p&gt;Ryan&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;#include &amp;quot;sdk_config.h&amp;quot;
#include &amp;quot;nrf_drv_spis.h&amp;quot;
#include &amp;quot;nrf_gpio.h&amp;quot;
#include &amp;quot;boards.h&amp;quot;
#include &amp;quot;app_error.h&amp;quot;
#include &amp;lt;string.h&amp;gt;

#include &amp;quot;nrf_log.h&amp;quot;
#include &amp;quot;nrf_log_ctrl.h&amp;quot;
#include &amp;quot;nrf_log_default_backends.h&amp;quot;

#define SPIS_INSTANCE 1 /**&amp;lt; SPIS instance index. */
static const nrf_drv_spis_t spis = NRF_DRV_SPIS_INSTANCE(SPIS_INSTANCE);/**&amp;lt; SPIS instance. */

// SPI transfer buffer
static uint8_t       m_tx_buf[] = {2,2,2,2,2,3,3,3,3,4,5,5,6,2,2,3,3,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,
                                   19,20,21,22,23,15,15,16,17,18,19,19,1,2,3,4,5,6,7,8,9,1,2,3,4,5,6,7,16,1,1,1};
static uint8_t       m_rx_buf[sizeof(m_tx_buf) + 1];        // RX buffer.
static const uint8_t m_length = sizeof(m_tx_buf);        // Transfer length.
static uint8_t       counter = 0;


void spis_event_handler(nrf_drv_spis_event_t event)
{
    if (event.evt_type == NRF_DRV_SPIS_XFER_DONE)
    {
        spis_xfer_done = true;
        bsp_board_led_invert(BSP_BOARD_LED_2);
        NRF_LOG_INFO(&amp;quot; packet_id: %d&amp;quot;,m_tx_buf[0]);
        counter = counter + 1;

        m_tx_buf[0] = counter;

        m_tx_buf[10] = m_tx_buf[10] + 3;
        m_tx_buf[20] = m_tx_buf[20] + 4;
        m_tx_buf[30] = m_tx_buf[30] + 5;
        m_tx_buf[40] = m_tx_buf[40] + 6;
        m_tx_buf[50] = m_tx_buf[50] + 7;
        m_tx_buf[60] = counter + 2;
    }
}

int main(void)
{
    NRF_POWER-&amp;gt;TASKS_CONSTLAT = 1;

    bsp_board_init(BSP_INIT_LEDS);

    APP_ERROR_CHECK(NRF_LOG_INIT(NULL));
    NRF_LOG_DEFAULT_BACKENDS_INIT();

    NRF_LOG_INFO(&amp;quot;SPIS example&amp;quot;);

    nrf_drv_spis_config_t spis_config = NRF_DRV_SPIS_DEFAULT_CONFIG;
    spis_config.csn_pin               = APP_SPIS_CS_PIN;
    spis_config.miso_pin              = APP_SPIS_MISO_PIN;
    spis_config.mosi_pin              = APP_SPIS_MOSI_PIN;
    spis_config.sck_pin               = APP_SPIS_SCK_PIN;

    // APP_SPIS_CS_PIN 31
    // APP_SPIS_MOSI_PIN 29
    // APP_SPIS_MISO_PIN 30
    // APP_SPIS_SCK_PIN 26

    APP_ERROR_CHECK(nrf_drv_spis_init(&amp;amp;spis, &amp;amp;spis_config, spis_event_handler));
    bsp_board_led_invert(BSP_BOARD_LED_0);
    while (1)
    {
        memset(m_rx_buf, 0, m_length);
        spis_xfer_done = false;

        APP_ERROR_CHECK(nrf_drv_spis_buffers_set(&amp;amp;spis, m_tx_buf, m_length, m_rx_buf, m_length));

        while (!spis_xfer_done)
        {
            __WFE();
        }

        NRF_LOG_FLUSH();

        bsp_board_led_invert(BSP_BOARD_LED_1);
    }
}
&lt;/pre&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: First 4 bits received by SPIM (from SPIS) are always 1?</title><link>https://devzone.nordicsemi.com/thread/361842?ContentTypeID=1</link><pubDate>Tue, 05 Apr 2022 12:38:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:05d7b32d-8d27-4218-a482-725990b26767</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;It might be timing related, so try to ensure some delays between&amp;nbsp;nrfx_spim_xfer() transfers and also I suspect that you are letting the driver handle the timing of the chip select pin, and the time between chip select go low and actual data on SPI likely is shorter than what the SPIS can handle. So I suggest edit nrfx_spim_xfer() and add a 10us delay (e.g. #include nrf_delay.h) by calling nrf_delay_us(10); right before&amp;nbsp;spim_xfer() in&amp;nbsp;nrfx_spim_xfer() in nrfx_spim.c.&lt;/p&gt;
&lt;p&gt;If that doesn&amp;#39;t help then a logic analyzer trace would be useful.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>