<?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>How does the chip know if I&amp;#39;m sending or receiving data using spi_send_recv?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/29903/how-does-the-chip-know-if-i-m-sending-or-receiving-data-using-spi_send_recv</link><description>Hi, I want to know how to properly indicate for the function 
 spi_send_recv(...)
 
 that I&amp;#39;m sending or receiving data on SPI. 
 On other platforms with library function/SDK, it&amp;#39;s done by setting unused buffer to NULL. For example if I want to send</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 30 Jan 2018 09:16:52 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/29903/how-does-the-chip-know-if-i-m-sending-or-receiving-data-using-spi_send_recv" /><item><title>RE: How does the chip know if I'm sending or receiving data using spi_send_recv?</title><link>https://devzone.nordicsemi.com/thread/118924?ContentTypeID=1</link><pubDate>Tue, 30 Jan 2018 09:16:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:515f09f0-1217-4c2c-9f46-e2d092e0a81b</guid><dc:creator>Mitch996</dc:creator><description>&lt;p&gt;Hello, you are absolutely right. The whole point of SPI is to constantly sending and reciving with 1 line of clock signal, I&amp;#39;ve fixed it, as long as you send the right sequence of 1s and 0s, the output cache will always get the correct result.&lt;/p&gt;
&lt;p&gt;Much obliged.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How does the chip know if I'm sending or receiving data using spi_send_recv?</title><link>https://devzone.nordicsemi.com/thread/118923?ContentTypeID=1</link><pubDate>Thu, 25 Jan 2018 13:48:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ae1bec21-72d8-4565-a736-e72a6620c70b</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;For a start - what SDK are you using because nothing I have (12,13 and 14) even have an spi_send_recv()? Have you looked at the code, does it allow for a null buffer?&lt;/p&gt;
&lt;p&gt;This is SPI so you are always both sending AND receiving, that&amp;#39;s the whole point of SPI, one byte comes in for every byte which goes out, so it&amp;#39;s not necessarily true that the driver would be written to allow you to do only one.&lt;/p&gt;
&lt;p&gt;Read the code. If the code crashes into error handling, debug it and see what caused it to get there. You have all the code and all the tools to work out why it crashes.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>