<?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 issue with softdevice enabled on nRF52840</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/47041/spi-issue-with-softdevice-enabled-on-nrf52840</link><description>Our application uses and external nand flash to store the data samples. The collected data is then be transferred using USB. So we chose usbd_ble_uart example and wrote code over it. We are seeing this weird problem of not detecting NAND flash when nRF52840</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 24 May 2019 04:31:48 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/47041/spi-issue-with-softdevice-enabled-on-nrf52840" /><item><title>RE: SPI issue with softdevice enabled on nRF52840</title><link>https://devzone.nordicsemi.com/thread/188930?ContentTypeID=1</link><pubDate>Fri, 24 May 2019 04:31:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7777f0ed-7168-4eb5-bdc8-a34f52f39bc1</guid><dc:creator>Vishnu Pradeep</dc:creator><description>&lt;p&gt;Hi all,&lt;/p&gt;
&lt;p&gt;The problem was with CS pin.&amp;nbsp;CONFIG_NFCT_PINS_AS_GPIOS was not defined in one project and defined in other.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI issue with softdevice enabled on nRF52840</title><link>https://devzone.nordicsemi.com/thread/188545?ContentTypeID=1</link><pubDate>Wed, 22 May 2019 12:01:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0cc3e544-1555-4da3-a8fd-0690d656f11c</guid><dc:creator>Vishnu Pradeep</dc:creator><description>&lt;p&gt;Thanks.&lt;/p&gt;
&lt;p&gt;where is it defined? I couldn&amp;#39;t find the function nrf_memset.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI issue with softdevice enabled on nRF52840</title><link>https://devzone.nordicsemi.com/thread/188154?ContentTypeID=1</link><pubDate>Tue, 21 May 2019 09:03:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8c1d3e62-3e30-4b79-83b9-373ac0a1ff17</guid><dc:creator>Rajat</dc:creator><description>&lt;p&gt;Also , for me memset was creating few issues when i used spi , you should try using nrf_memset function.&lt;/p&gt;
&lt;p&gt;Maybe that helps&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI issue with softdevice enabled on nRF52840</title><link>https://devzone.nordicsemi.com/thread/188078?ContentTypeID=1</link><pubDate>Tue, 21 May 2019 06:00:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:93f57c30-5a20-4cfb-baaa-a4d028854331</guid><dc:creator>Rajat</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/mcp_5F00_can.c"&gt;devzone.nordicsemi.com/.../mcp_5F00_can.c&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;you can take refernce from this file , it won&amp;#39;t compile on your end ,because it needs other header files and stuff , But it can help you with few things i hope&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI issue with softdevice enabled on nRF52840</title><link>https://devzone.nordicsemi.com/thread/188076?ContentTypeID=1</link><pubDate>Tue, 21 May 2019 05:55:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f4d8f8a0-221e-436b-a002-323a3105dee3</guid><dc:creator>Vishnu Pradeep</dc:creator><description>&lt;p&gt;I am using NRF_LOG RTT not UART. Even if I disable NRF_LOG the issue exists&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI issue with softdevice enabled on nRF52840</title><link>https://devzone.nordicsemi.com/thread/188075?ContentTypeID=1</link><pubDate>Tue, 21 May 2019 05:53:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:528b64bb-c521-4de7-8ea3-d30b00104184</guid><dc:creator>Rajat</dc:creator><description>&lt;p&gt;Yes , its possible&amp;nbsp;&lt;br /&gt;But i also think that NRF_LOG by default is on UART pins(8,6) which are same for your spi slave&lt;br /&gt;Maybe try interfacing first on the separate pins or not use NRF_LOG&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI issue with softdevice enabled on nRF52840</title><link>https://devzone.nordicsemi.com/thread/188073?ContentTypeID=1</link><pubDate>Tue, 21 May 2019 05:46:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d9c9d1a3-af5c-46d9-8496-ee2f3be18624</guid><dc:creator>Vishnu Pradeep</dc:creator><description>&lt;p&gt;Does this happen if there is any issue with hardware?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI issue with softdevice enabled on nRF52840</title><link>https://devzone.nordicsemi.com/thread/188071?ContentTypeID=1</link><pubDate>Tue, 21 May 2019 05:14:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3eb799c5-13d7-495f-9917-58db98037d00</guid><dc:creator>Rajat</dc:creator><description>&lt;p&gt;My project is actually huge , so i will send you the can files and sdk_config file&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI issue with softdevice enabled on nRF52840</title><link>https://devzone.nordicsemi.com/thread/188062?ContentTypeID=1</link><pubDate>Tue, 21 May 2019 04:29:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6071e9ef-6d61-4260-8b58-8ab4f868bbd9</guid><dc:creator>Vishnu Pradeep</dc:creator><description>&lt;p&gt;Thanks, Actually the drivers are working fine and I could build my application successfully. But I have to run spi example code after chip erase to get my application to work!!.&lt;br /&gt;Anyway I can cross check with your code if anything is wrong with the sdk config file or any other settings. Please share.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI issue with softdevice enabled on nRF52840</title><link>https://devzone.nordicsemi.com/thread/188058?ContentTypeID=1</link><pubDate>Tue, 21 May 2019 03:39:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4dfb0e54-1def-4228-b704-1a010c5001e2</guid><dc:creator>Rajat</dc:creator><description>&lt;p&gt;i have used spi peripheral for CAN bus protocol , would you like to get some reference from that?. It works on my side for CAN bus&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI issue with softdevice enabled on nRF52840</title><link>https://devzone.nordicsemi.com/thread/187945?ContentTypeID=1</link><pubDate>Mon, 20 May 2019 13:16:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4bce7287-4a8b-4c2b-b6ff-65c05443c44f</guid><dc:creator>Vishnu Pradeep</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/spi_5F00_nand.rar"&gt;devzone.nordicsemi.com/.../spi_5F00_nand.rar&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;this is the nand flash library we are using. This gives the same issue&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI issue with softdevice enabled on nRF52840</title><link>https://devzone.nordicsemi.com/thread/187878?ContentTypeID=1</link><pubDate>Mon, 20 May 2019 11:37:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d4f60eb5-429a-48c9-bea2-35f18d8382e0</guid><dc:creator>Rajat</dc:creator><description>&lt;p&gt;Can you send the code that you are using , previous one has a lot of errors in it , its not compiling on my end&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI issue with softdevice enabled on nRF52840</title><link>https://devzone.nordicsemi.com/thread/187877?ContentTypeID=1</link><pubDate>Mon, 20 May 2019 11:36:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e986cac6-9f40-410e-8580-a63b7a584c23</guid><dc:creator>Vishnu Pradeep</dc:creator><description>&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;1. Yes it is going high and low. only SPI MOSI/MISO is not giving anything. CS and SCK is working.&lt;br /&gt;2. I tried this, but same problem.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI issue with softdevice enabled on nRF52840</title><link>https://devzone.nordicsemi.com/thread/187870?ContentTypeID=1</link><pubDate>Mon, 20 May 2019 11:19:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ca5863ef-d513-4a94-a974-1fe014131ac0</guid><dc:creator>Rajat</dc:creator><description>&lt;p&gt;1.&amp;nbsp; Is your CS pin going high and low as demanded by the Chip ?&lt;br /&gt;2.&amp;nbsp; Can you try defining the spi_config.ss_pin =&amp;nbsp; CS_PIN_NUMBER(10 i guess) , instead of NULL.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI issue with softdevice enabled on nRF52840</title><link>https://devzone.nordicsemi.com/thread/187863?ContentTypeID=1</link><pubDate>Mon, 20 May 2019 10:44:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c95ebd2b-cc50-4eae-956e-a71347c0ebc9</guid><dc:creator>Vishnu Pradeep</dc:creator><description>&lt;p&gt;Code is not getting stuck. its just not reading the ID of the device, or I am not seeing any kind of transfer from nrf528400 SPI. My application check for device ID 3 times and if it fails it enters to an infinite loop.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI issue with softdevice enabled on nRF52840</title><link>https://devzone.nordicsemi.com/thread/187834?ContentTypeID=1</link><pubDate>Mon, 20 May 2019 09:11:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5680ad21-fc33-4ed7-b10d-fe41ff2b18d9</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Have you tried to add some debug output (e.g. UART) to see if the code may be stuck somewhere? Have you tried calling&amp;nbsp;nrf_drv_spi_transfer() several times with a delay of 100ms, to for instance check if it just needs a dummy read before it responds as expected?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI issue with softdevice enabled on nRF52840</title><link>https://devzone.nordicsemi.com/thread/187684?ContentTypeID=1</link><pubDate>Fri, 17 May 2019 13:00:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3baf1805-fd30-4bca-97ae-2d209c7e3aec</guid><dc:creator>Vishnu Pradeep</dc:creator><description>&lt;p&gt;DSO shows no data transmission from nrf52840 after running the code fresh. Again if I run the spi example code and rerun our application it shows data transmission!!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI issue with softdevice enabled on nRF52840</title><link>https://devzone.nordicsemi.com/thread/185974?ContentTypeID=1</link><pubDate>Wed, 08 May 2019 12:44:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f616832a-0db8-402e-85a5-ed8fcbdac3e2</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;I think the next step is a logic analyzer trace to compare working and failing.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI issue with softdevice enabled on nRF52840</title><link>https://devzone.nordicsemi.com/thread/185972?ContentTypeID=1</link><pubDate>Wed, 08 May 2019 12:42:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a9c2152f-7642-4412-8d5f-b49c7b7e31f9</guid><dc:creator>Vishnu Pradeep</dc:creator><description>&lt;p&gt;I added delay of 200ms before flash initialization. It didn&amp;#39;t work. But if I run the above code and then go back to my application and dump it, it works.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI issue with softdevice enabled on nRF52840</title><link>https://devzone.nordicsemi.com/thread/185968?ContentTypeID=1</link><pubDate>Wed, 08 May 2019 12:38:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f8939ef0-47b9-4a64-8461-ad418151cbfe</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Maybe a logic analyzer trace of the serial interface can give an idea if some pins may be floating causing issues? Also a short delay (e.g. 100ms) in the beginning of main() before writing to the external flash may be something to also try.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI issue with softdevice enabled on nRF52840</title><link>https://devzone.nordicsemi.com/thread/185954?ContentTypeID=1</link><pubDate>Wed, 08 May 2019 12:05:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a6b2667c-a3c8-404d-8874-2a7503f6a33a</guid><dc:creator>Vishnu Pradeep</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;int main(void)
{
   // bsp_board_init(BSP_INIT_LEDS);

    APP_ERROR_CHECK(NRF_LOG_INIT(NULL));
    NRF_LOG_DEFAULT_BACKENDS_INIT();



    nrf_gpio_cfg_output(10);
    nrf_gpio_cfg_output(25);

   nrf_gpio_pin_set(10);

    nrf_drv_spi_config_t spi_config = NRF_DRV_SPI_DEFAULT_CONFIG;
    spi_config.ss_pin   =NULL ;
    spi_config.miso_pin =7;
    spi_config.mosi_pin =9;
    spi_config.sck_pin=8;
    APP_ERROR_CHECK(nrf_drv_spi_init(&amp;amp;spi, &amp;amp;spi_config, spi_event_handler, NULL));


    NRF_LOG_INFO(&amp;quot;SPI example started.&amp;quot;);

  // Reset rx buffer and transfer done flag
        memset(rx_buf, 0, 200);
        memset(tx_buf, 0, 200);
        tx_buf[0]=0x9F;
        tx_buf[1]=0x00;
        spi_xfer_done = false;
        
         nrf_gpio_pin_clear(10);


        APP_ERROR_CHECK(nrf_drv_spi_transfer(&amp;amp;spi, tx_buf, 2, rx_buf, 4));
        //APP_ERROR_CHECK(nrf_drv_spi_transfer(&amp;amp;spi, m_tx_buf, 2, m_rx_buf, m_length));

        while (!spi_xfer_done)
        {
            __WFE();
        } 
        nrf_gpio_pin_set(10);
    if(m_rx_buf[2]==0x98 &amp;amp;&amp;amp; m_rx_buf[3] == 0xBD){
    NRF_LOG_INFO(&amp;quot;Flash detected.&amp;quot;);
    }
    else{
    NRF_LOG_INFO(&amp;quot;Flash not detected.&amp;quot;);
    }
       
        while(1);
    
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This is the code I used to check data. It reads ID properly.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI issue with softdevice enabled on nRF52840</title><link>https://devzone.nordicsemi.com/thread/185823?ContentTypeID=1</link><pubDate>Wed, 08 May 2019 05:44:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:031e4103-68b1-4ad7-98fe-26e515fd55d1</guid><dc:creator>Rajat</dc:creator><description>&lt;p&gt;A piece of code will make it easier for the viewers to understand what can be done to solve the issue&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Rajat &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>