<?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 problems trying to communicate nRF9161 DK Master with ESP32 Slave</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/119592/spi-problems-trying-to-communicate-nrf9161-dk-master-with-esp32-slave</link><description>HI there, 
 I&amp;#39;ve been following the DevAcademy Lesson 5 exercise example on SPI communication to get a nRF9161 DK (as a Master) and an ESP32 (as a Slave) to communicate synchronously. Right now I&amp;#39;m using a ESP32 DevKitC V4 for practicing, but eventually</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 06 Mar 2025 20:19:46 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/119592/spi-problems-trying-to-communicate-nrf9161-dk-master-with-esp32-slave" /><item><title>RE: SPI problems trying to communicate nRF9161 DK Master with ESP32 Slave</title><link>https://devzone.nordicsemi.com/thread/526255?ContentTypeID=1</link><pubDate>Thu, 06 Mar 2025 20:19:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e5bbe32e-99df-4499-884b-9f608363a167</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;An espressif,esp32 node cannot be placed under a nordic,nrf-spim node in the Zephyr Devicetree because the espressif,esp32 is not an SPI peripheral—it represents a full SoC (System-on-Chip), not an SPI device.&lt;/p&gt;
&lt;p&gt;In Devicetree, nodes represent hardware components, and the hierarchy should reflect how devices are connected in hardware.&lt;/p&gt;
&lt;p&gt;- nordic,nrf-spim represents an SPI controller (master), which means it can have SPI devices (slaves) as child nodes.&lt;/p&gt;
&lt;p&gt;- espressif,esp32 represents an entire microcontroller, which cannot be a child of an SPI controller since it is not an SPI peripheral.&lt;/p&gt;
&lt;p&gt;If you have problems communicating between an spi master and an spi slave, my suggestions are:&lt;/p&gt;
&lt;p&gt;- make sure both devices are powered, have a common ground and same power supply level.&lt;/p&gt;
&lt;p&gt;- connect the 4 pins: chip select, clock, miso and mosi.&lt;/p&gt;
&lt;p&gt;- attach a logic analyzer to the pins&lt;/p&gt;
&lt;p&gt;- execute an spi transfer from the master, look that data is correct on mosi, check values on miso is received correctly in the rx buffer on the master.&lt;/p&gt;
&lt;p&gt;- if there are any errors, try to add a small delay (e.g. 100us) between chip select go low (active) and the spi tranfer (clock), in case the slave needs some time to be ready to receive the data.&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>