<?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>Does it have any API for notify when SPI burst read and write finished</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/110949/does-it-have-any-api-for-notify-when-spi-burst-read-and-write-finished</link><description>Hi 
 I use nRF7002-DK, SDK:V2.52 zephyr driver, our application is use for SPI and UART for transmition.For SPI and UART isn&amp;#39;t all are EDMA?I use SPI burst read or write, how can I know the the transceive is already finished?does it have API for get the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 09 May 2024 07:10:18 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/110949/does-it-have-any-api-for-notify-when-spi-burst-read-and-write-finished" /><item><title>RE: Does it have any API for notify when SPI burst read and write finished</title><link>https://devzone.nordicsemi.com/thread/482635?ContentTypeID=1</link><pubDate>Thu, 09 May 2024 07:10:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8947b0ff-bfb4-4ed4-be62-fffc9edc2e32</guid><dc:creator>yithwe</dc:creator><description>&lt;p&gt;Hi Kenneth&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Thanks for your suggestion, for&amp;nbsp;our application we need to know EDMA finished it or not and need to know cs pin status to decide to go next step or for next data transceive start.&lt;/p&gt;
&lt;p&gt;Best Regards&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Tina&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Does it have any API for notify when SPI burst read and write finished</title><link>https://devzone.nordicsemi.com/thread/482442?ContentTypeID=1</link><pubDate>Wed, 08 May 2024 08:02:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:86c15c46-8b55-433d-b873-47c824fce4af</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;You should be able to search through the nRF Connect SDK repositories or documentation for use of&amp;nbsp;&lt;span&gt;spi_transceive_cb() if you want.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Normally though, I expect it is more common to place all the spi transcations you want to perform in a separate thread, and then each of the&amp;nbsp;spi_transceive_dt() will be synchrounous transfer, thereby the spi_transceive_dt() will not return until the transfer is complete. This is slightly more easy to implement than having to wait for the callback for each transfer. Other threads can run while&amp;nbsp;spi_transceive_dt() is executed.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Current consumption is the same for the two approaches.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Kenneth&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Does it have any API for notify when SPI burst read and write finished</title><link>https://devzone.nordicsemi.com/thread/482397?ContentTypeID=1</link><pubDate>Wed, 08 May 2024 01:57:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:13aea5cf-82bd-4ebe-8a31-1ce37704f0d8</guid><dc:creator>yithwe</dc:creator><description>&lt;p&gt;Hi Kenneth&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Does it have any sample code for API&amp;nbsp;&lt;span&gt;spi_transceive_cb?can we use&amp;nbsp;&lt;/span&gt;&lt;span&gt;spi_transceive_cb to&amp;nbsp; instead&amp;nbsp;spi_transceive_dt?I need to know more detail about how to use call back function, Thanks.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best Regards&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; Tina&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Does it have any API for notify when SPI burst read and write finished</title><link>https://devzone.nordicsemi.com/thread/482359?ContentTypeID=1</link><pubDate>Tue, 07 May 2024 16:24:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a3e9bb94-2eb0-4c88-ae46-79b458103f63</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Yes, Zephyr can provide a callback mechanism for notifying when SPI read/write operations are finished. The callback function is specified when calling the&amp;nbsp;spi_transceive_cb&amp;nbsp;function. This function reads/writes the specified amount of data from the SPI driver and triggers the callback upon completion.&lt;/p&gt;
&lt;p&gt;In this callback, you can implement the logic that should be executed when the SPI operation is finished.&amp;nbsp;For more details, you can refer to the Zephyr documentation on the&amp;nbsp;SPI interface:&lt;br /&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/hardware/peripherals/spi.html#c.spi_transceive_cb"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/hardware/peripherals/spi.html#c.spi_transceive_cb&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In the devicetree make sure to use the &amp;quot;nordic, nrf-spim&amp;quot; node to ensure that you use EasyDMA, ref:&lt;br /&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/build/dts/api/bindings/spi/nordic%2Cnrf-spim.html#dtbinding-nordic-nrf-spim"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/build/dts/api/bindings/spi/nordic%2Cnrf-spim.html#dtbinding-nordic-nrf-spim&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you use &amp;quot;nordic, nrf-spi&amp;quot; it may not be using EasyDMA.&lt;/p&gt;
&lt;p&gt;For uart make sure to use &amp;quot;nordic, nrf-uarte&amp;quot; n&lt;span&gt;ode to ensure that you use EasyDMA,&lt;/span&gt;, ref:&lt;br /&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/build/dts/api/bindings/serial/nordic%2Cnrf-uarte.html#dtbinding-nordic-nrf-uarte"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/build/dts/api/bindings/serial/nordic%2Cnrf-uarte.html#dtbinding-nordic-nrf-uarte&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If you use &amp;quot;nordic, nrf-uart&amp;quot; it may not be using EasyDMA.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>