<?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 slave question</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/76695/spi-slave-question</link><description>Hi: I have write a spi slave, and write a spi master on STM32, It can receive data from STM32,But I have no time to prepare the response data. 
 as the code below, I can receive the command 0x01 from master, But the response data can only be response</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 12 Jul 2021 08:20:23 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/76695/spi-slave-question" /><item><title>RE: SPI slave question</title><link>https://devzone.nordicsemi.com/thread/319531?ContentTypeID=1</link><pubDate>Mon, 12 Jul 2021 08:20:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ca0fd887-c51f-4866-8c63-64aa810495ef</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Then you have to wait for the next transaction. The data that is intended to be sent in a transaction has to be ready to be clocked out&amp;nbsp;before the transaction starts.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI slave question</title><link>https://devzone.nordicsemi.com/thread/317379?ContentTypeID=1</link><pubDate>Mon, 28 Jun 2021 06:45:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a8e7aca9-6949-41a2-a53a-9b27af8f3552</guid><dc:creator>great-master</dc:creator><description>&lt;p&gt;I coun&amp;#39;t set my tx buffer exactly, because I don&amp;#39;t know which command will be receive,I need to know waht the master request .My english is not very good, can you understand?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI slave question</title><link>https://devzone.nordicsemi.com/thread/317155?ContentTypeID=1</link><pubDate>Fri, 25 Jun 2021 08:37:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b2aa92a7-2870-490c-a179-bde96aea2761</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]But the response data can only be response in next reqest, At the first request, m_rx_buf buffer have no data.[/quote]
&lt;p&gt;This is as I would expect based on the SPI protocol. The SPI protocol works as shifting register on both sides, thus you should clock out data as you receive data. You set the tx buffer first after you have received data and the transaction has been completed. How would you then expect it to be able to send the data in that very same transaction?&lt;/p&gt;
&lt;p&gt;Maybe I misunderstood you, in that case please elaborate on your question.&lt;/p&gt;
&lt;p&gt;best regards&lt;/p&gt;
&lt;p&gt;Jared&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>