<?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>NRF52840 SPI cannot work</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/103900/nrf52840-spi-cannot-work</link><description>I connected NRF52840 to an analog front-end chip with SPI, but SPI doesn&amp;#39;t work (both spi1 and spi2), the configurations have been verified elsewhere. I measured the voltage of MOSI and MISO, and they&amp;#39;re about 2.6V (DVDD = 3V) 
 What is the problem with</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 25 Sep 2023 08:16:51 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/103900/nrf52840-spi-cannot-work" /><item><title>RE: NRF52840 SPI cannot work</title><link>https://devzone.nordicsemi.com/thread/447382?ContentTypeID=1</link><pubDate>Mon, 25 Sep 2023 08:16:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2f635620-19be-42da-aa0b-5021645eefcc</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Checking the signals on a scope is very helpful, then you can get a lot more information about what is happening on the bus. If the voltage on the MOSI and MISO lines is 2.6V while VDD is 3V it points to some hardware connection issue, you would expect these lines to be either GND or VDD, not somewhere in between.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;When you say the configuration has been verified elsewhere, you mean to say that you know that the mode, frequency and bit order should be correct?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Did you get your hardware design reviewed by us before you went to manufacturing?&amp;nbsp;&lt;br /&gt;We are happy to review your schematic and layout if you upload it here (if you do please open a new ticket though, as a hardware review would have to be performed by someone else).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840 SPI cannot work</title><link>https://devzone.nordicsemi.com/thread/446606?ContentTypeID=1</link><pubDate>Tue, 19 Sep 2023 09:08:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:edc6f1cf-1adb-4a7f-90e5-dad9310f0a14</guid><dc:creator>newspace</dc:creator><description>&lt;p&gt;1. I use SDK 15. I suceeded to use SPI in another board.&lt;br /&gt;2. I can only receive 0x00 from SPI no matter what is sent to it. I tried to configure some registers of the AFE but it didn&amp;#39;t work. Maybe I should&amp;nbsp;&lt;span&gt;use an oscilloscope or logic analyzer to check the signals.&lt;br /&gt;&lt;/span&gt;3. It&amp;#39;s my &lt;span&gt;custom&amp;nbsp;&lt;/span&gt;board, not a DK.Another board is an ADS1299 of TI and NRF52840. I use P0.13,&amp;nbsp;&lt;span&gt;P0.15,&amp;nbsp;P0.17 and P0.20.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The configuration of SPI:&lt;br /&gt; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;nrf_drv_spi_config_t spi_config = NRF_DRV_SPI_DEFAULT_CONFIG;&lt;br /&gt; spi_config.bit_order = NRF_DRV_SPI_BIT_ORDER_MSB_FIRST; // unknown&lt;br /&gt; spi_config.mode = NRF_DRV_SPI_MODE_1;&lt;br /&gt; spi_config.frequency = NRF_DRV_SPI_FREQ_4M;&lt;br /&gt; spi_config.irq_priority = APP_IRQ_PRIORITY_HIGH;&lt;br /&gt; &lt;br /&gt; //spi_config.ss_pin = SPI_SS_PIN; //P0.13&lt;br /&gt; spi_config.miso_pin = SPI_MISO_PIN; //P0.15&lt;br /&gt; spi_config.mosi_pin = SPI_MOSI_PIN; //P0.17&lt;br /&gt; spi_config.sck_pin = SPI_SCK_PIN; //P0.20&lt;br /&gt; spi_config.orc = 0x54; // flag&lt;br /&gt; APP_ERROR_CHECK(nrf_drv_spi_init(&amp;amp;spi, &amp;amp;spi_config, spi_event_handler, NULL));&lt;br /&gt; NRF_LOG_INFO( &amp;quot;SPI INIT OK.\r\n&amp;quot;); &lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840 SPI cannot work</title><link>https://devzone.nordicsemi.com/thread/446602?ContentTypeID=1</link><pubDate>Tue, 19 Sep 2023 08:49:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d3dc359f-4f57-42b2-a3b3-cf3d5abf399a</guid><dc:creator>helsing</dc:creator><description>[quote user=""]What is the problem with my circuit?[/quote]
&lt;p&gt;Let us look into this together. Would you be able to share some context? Which SDK version are you using? And which driver?&lt;/p&gt;
[quote user=""]SPI doesn&amp;#39;t work[/quote]
&lt;p&gt;How do you verify that SPI is not working? Do you have any logs available from the terminal? Have you inspected the signal using an oscilloscope or logic analyzer? &lt;/p&gt;
[quote user=""]the configurations have been verified elsewhere[/quote]
&lt;p&gt;How have you configured this and the other project? Are you using a DK or a custom board? Which pins are you using?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>