<?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>Double buffered SPIM TXD and RXD registers on nrf5340</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/73995/double-buffered-spim-txd-and-rxd-registers-on-nrf5340</link><description>I am using SPIM4 with easyDMA in list mode to read a set of registers from an SPI device, and everything seemed to work great until I attempted to use the double buffered TXD and RXD registers. Am I missing something, or is the double buffered functionality</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 15 Apr 2021 11:36:13 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/73995/double-buffered-spim-txd-and-rxd-registers-on-nrf5340" /><item><title>RE: Double buffered SPIM TXD and RXD registers on nrf5340</title><link>https://devzone.nordicsemi.com/thread/305069?ContentTypeID=1</link><pubDate>Thu, 15 Apr 2021 11:36:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:07742265-9f7c-4e17-ad86-8220388df19a</guid><dc:creator>Alexander Thorstensen</dc:creator><description>&lt;p&gt;I expanded the &amp;quot;broken example&amp;quot; from my original post to use two independent rx_buffers, rx_buff[0], rx_buff[1]&lt;/p&gt;
&lt;p&gt;As before all rx_buff memory is painted with 0xAA before SPIM transaction, and the buffers are logged before and after the transactions has completed. This gave the result captured below:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/3833.Capture2.PNG" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Based on this result it seems like the double buffered registers are reloaded at the next TASK_START trigger, even though list mode is used.&lt;br /&gt;&lt;br /&gt;My hope was that the SPIM would hold off reloading until a TASK_STOP trigger has been received. I am using SPIM with a counter to implement a burst read from a chip that requires slave select to deactivate between every register access, and I was hoping to use double buffered RXD / TXD to prime for burst n+1 at the start for burst n. &lt;br /&gt;&lt;br /&gt;The obvious solution would be to start transactions from a drdy triggered ISR, or to prime the SPIM for the next burst at the end of every burst, but this will result in quite tight ISR latency requirements. &lt;br /&gt;&lt;br /&gt;Suggestions to alternative solutions are most welcome :)&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>