<?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 to get DMA to do scheduled short burst SPI</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/110926/how-to-get-dma-to-do-scheduled-short-burst-spi</link><description>I&amp;#39;m using an nRF52840 and SPI 15.3 here.. 
 What I&amp;#39;d like to do is to have SPI write (at 10 Mbps) 8 transactions of 2 bytes each every 91uS and do that for say 512 times before telling me it&amp;#39;s done (i.e. all controlled by DMA/hardware) 
 Is this possible</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 07 May 2024 14:54:29 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/110926/how-to-get-dma-to-do-scheduled-short-burst-spi" /><item><title>RE: how to get DMA to do scheduled short burst SPI</title><link>https://devzone.nordicsemi.com/thread/482340?ContentTypeID=1</link><pubDate>Tue, 07 May 2024 14:54:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dc99f8aa-7e6d-48a9-8dbf-30ed7804d8f4</guid><dc:creator>Randy Lee</dc:creator><description>&lt;p&gt;Great!&amp;nbsp; Thanx! This will get me down the right direction...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to get DMA to do scheduled short burst SPI</title><link>https://devzone.nordicsemi.com/thread/482267?ContentTypeID=1</link><pubDate>Tue, 07 May 2024 11:55:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d49dc345-b6e6-4596-9d31-ff9fe3cfbd7f</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]What I&amp;#39;d like to do is to have SPI write (at 10 Mbps) 8 transactions of 2 bytes each every 91uS and do that for say 512 times before telling me it&amp;#39;s done (i.e. all controlled by DMA/hardware)[/quote]
&lt;p&gt;SPIM can be used with up to 8 MHz, while the nRF52840&amp;#39;s SPIM3 can do up to 32 MHz:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/spim.html?cp=5_0_0_5_24_5#topic"&gt;https://infocenter.nordicsemi.com/topic/ps_nrf52840/spim.html?cp=5_0_0_5_24_5#topic&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]Is this possible on this chipset? Otherwise, I suppose I have to crank up a timer and run the bursts manually in the ISR?[/quote]
&lt;p&gt;You can setup a high-speed timer instance to trigger every &amp;#39;n&amp;#39; us, together with a PPI channel, and use EasyDMA Array List (&lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/easydma.html?cp=5_0_0_3_5_1#arraylist"&gt;https://infocenter.nordicsemi.com/topic/ps_nrf52840/easydma.html?cp=5_0_0_3_5_1#arraylist&lt;/a&gt;) feature, but you will have to count the amount of transactions in order to reset the auto-increment.&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s an example for NCS that does this (fairly low-level):&amp;nbsp;&lt;a href="https://github.com/too1/ncs-spi-arraylist-example/blob/master/src/main.c"&gt;https://github.com/too1/ncs-spi-arraylist-example/blob/master/src/main.c&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>