<?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>NRF52832 DMA HALF TRANSFER INTERRUPT AND EASYDMA ARRAYLIST</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/51889/nrf52832-dma-half-transfer-interrupt-and-easydma-arraylist</link><description>Hi , 
 1-) Is there any dma half transfer interrupt ? if there is where it is in documents ? ( i check this link but i couldnt see anything about this https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.nrf52832.ps.v1.1%2Feasydma</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 24 Feb 2020 13:52:11 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/51889/nrf52832-dma-half-transfer-interrupt-and-easydma-arraylist" /><item><title>RE: NRF52832 DMA HALF TRANSFER INTERRUPT AND EASYDMA ARRAYLIST</title><link>https://devzone.nordicsemi.com/thread/235980?ContentTypeID=1</link><pubDate>Mon, 24 Feb 2020 13:52:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fd9206c6-1515-45a6-b3c3-b6fbfcc85bad</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;The ArrayList feature is only enabled for the TWIM and SPIM peripherals.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;From SAADC&amp;#39;s&amp;nbsp;&lt;a title="EasyDMA" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/saadc.html?cp=4_2_0_36_5#saadc_easydma"&gt;EasyDMA&lt;/a&gt;&amp;nbsp;chapter:&amp;nbsp;&lt;br /&gt;&lt;span&gt;&amp;quot;The Result buffer is located at the address specified in the RESULT.PTR register. The RESULT.PTR register is double-buffered and it can be updated and prepared for the next START task immediately after the STARTED event is generated.&amp;nbsp;&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If you update the RESULT.PTR register after each STARTED event, then you can&amp;nbsp;connect the END event to the START task, connected the STARTED event to a TIMER&amp;#39;s START task, and a TIMERs COMPARE event to the SAADC&amp;#39;s SAMPLE task.&amp;nbsp;&lt;br /&gt;That way the SAADC can run with as little delay as possible when switching buffers.&amp;nbsp;&lt;br /&gt;You will also need to fork the SAADC&amp;#39;s END event to the TIMER&amp;#39;s STOP task, in order to prevent the TIMER from triggering a SAMPLE task when the SAADC is reading the RESULT registers.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52832 DMA HALF TRANSFER INTERRUPT AND EASYDMA ARRAYLIST</title><link>https://devzone.nordicsemi.com/thread/235831?ContentTypeID=1</link><pubDate>Sun, 23 Feb 2020 05:54:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1d86d8af-a7a2-437a-b4a2-940126ed30de</guid><dc:creator>MCB</dc:creator><description>[quote userid="13562" url="~/f/nordic-q-a/51889/nrf52832-dma-half-transfer-interrupt-and-easydma-arraylist/208590"]&amp;nbsp;Yes. The Array List feature is fairly simple, the pointer register in f.ex. the SPIM:&amp;nbsp;&lt;a title="  RXD.PTR  " href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/spim.html?cp=3_1_0_30_5_8#register.RXD.PTR"&gt;RXD.PTR&lt;/a&gt;, is incremented by the&amp;nbsp;&lt;a title="  RXD.MAXCNT  " href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/spim.html?cp=3_1_0_30_5_9#register.RXD.MAXCNT"&gt;RXD.MAXCNT&lt;/a&gt;&amp;nbsp;size after the&amp;nbsp;&lt;span&gt;EVENTS_END has been fired. It is then up to you to trigger another&amp;nbsp;TASKS_START in order to fill the next array of&amp;nbsp;&lt;a title="  RXD.MAXCNT  " href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/spim.html?cp=3_1_0_30_5_9#register.RXD.MAXCNT"&gt;RXD.MAXCNT&lt;/a&gt;&amp;nbsp;size.&amp;nbsp;&lt;/span&gt;[/quote]
&lt;p&gt;i read whole Saadc section in document but i couldnt see such specification. i have also tested it by real code. But&amp;nbsp;RESULT.PTR did not changed after END event .Is there any specific bit to activate&amp;nbsp;auto increment&amp;nbsp; of&amp;nbsp; xxx.PTR ?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Sorry , does this&amp;nbsp;&lt;span&gt;&amp;nbsp;auto increment&amp;nbsp; of&amp;nbsp; xxx.PTR&lt;/span&gt; behavior belong to only some peripherals such as spi ? or any peripheral with EasyDma?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52832 DMA HALF TRANSFER INTERRUPT AND EASYDMA ARRAYLIST</title><link>https://devzone.nordicsemi.com/thread/208620?ContentTypeID=1</link><pubDate>Mon, 09 Sep 2019 09:14:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:90fd7a58-d986-4115-b1b3-76225bcd3593</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;I updated my previous post before I noticed that you had answered, I suggest you read it.&lt;br /&gt;&lt;br /&gt;1) The Maximum buffer size is 255 bytes, therefore&amp;nbsp;I suggest 32 x 128bytes (4096bytes), or 17 x 241(4097bytes).&lt;/p&gt;
&lt;p&gt;2) Since the list feature auto-increment the DMA address pointer, we can immediately start another transfer. DMA is handled by the SPIM HW automatically.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;3) Correct, this will keep track of how many arrays have been filled. The &amp;quot;fork&amp;quot; is a feature of a &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/ppi.html?cp=3_1_0_21#concept_sxf_21l_1s"&gt;PPI — Programmable peripheral interconnect&lt;/a&gt;&amp;nbsp;channel where one EVENT can trigger one additional TASK without having to create an additional channel.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;4)You can set up another&amp;nbsp;compare&amp;nbsp;event. By setting the&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/timer.html?cp=3_1_0_23_4_7#register.CC-1"&gt;CC[1]&lt;/a&gt; register to half of CC0, and enabling the interrupt for CC1 by writing to the&amp;nbsp;&lt;a title="  INTENSET  " href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/timer.html?cp=3_1_0_23_4_1#register.INTENSET"&gt;INTENSET&lt;/a&gt;&amp;nbsp;register. The TIMER driver should forward an event to the application&amp;#39;s TIMER callback after half the arrays have been transferred. The callback is provided as the event handler in&amp;nbsp;&lt;a title="nrfx_timer_init" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/group__nrfx__timer.html?cp=5_1_6_9_0_35_1_19#ga4ff72f2933ca09b483ebabb9bbd8cdbc"&gt;nrfx_timer_init&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52832 DMA HALF TRANSFER INTERRUPT AND EASYDMA ARRAYLIST</title><link>https://devzone.nordicsemi.com/thread/208599?ContentTypeID=1</link><pubDate>Mon, 09 Sep 2019 08:29:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d6630bfb-fc5b-4c8b-987f-1cc47ae5ce36</guid><dc:creator>MCB</dc:creator><description>[quote userid="13562" url="~/f/nordic-q-a/51889/nrf52832-dma-half-transfer-interrupt-and-easydma-arraylist/208590"]You have to track how many&amp;nbsp;EVENTS_END&amp;nbsp;has been fired in order to know when to stop triggering the&amp;nbsp;TASKS_START. This can be done either in SW or HW. With HW you can connect the&amp;nbsp;EVENTS_END&amp;nbsp;with the&amp;nbsp;TASKS_START&amp;nbsp;event via a PPI channel, and fork the&amp;nbsp;EVENTS_END&amp;nbsp;event to a &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/timer.html?cp=3_1_0_23#concept_xbd_hqp_sr"&gt;TIMER — Timer/counter&lt;/a&gt;&amp;#39;s&amp;nbsp;TASKS_COUNT in order to increment the said counter. Then you can control the number of arrays you want by using the TIMER&amp;#39;s&amp;nbsp;EVENTS_COMPARE[x] event to trigger the&amp;nbsp;TASKS_CHG[0].DIS of a channel group that includes the PPI channel of the&amp;nbsp;EVENTS_END-&amp;gt;TASKS_START channel. This will then turn off the PPI channel that keeps the SPIM in a perpetual loop, thereby stopping it after x iterations where x is set in the TIMER&amp;#39;s &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/timer.html?cp=3_1_0_23_4_6#register.CC-0"&gt;CC[0]&lt;/a&gt;&amp;nbsp;register.[/quote]
&lt;p&gt;Actually i&amp;nbsp;want to port my stm32 code in to nrf52 , i was using half transfer int this was &amp;quot;like&amp;quot; circular buffer. So i dont understand your example 100% ,since i did not realize PPI yet .So first i need to read&amp;nbsp;about it ....&lt;/p&gt;
&lt;p&gt;But before reading it from your answer i have an idea if i understood you correctly.&lt;/p&gt;
&lt;p&gt;I need 1024 sample 32bit each ram area to store my samples. While cpu makes some calculation on the first 512 sample , dma should write samples to remaining area then so on....&amp;nbsp;&lt;/p&gt;
&lt;p&gt;if i will inspire from your message , can i say i need to ;&lt;/p&gt;
&lt;p&gt;1-) create&amp;nbsp; 16x256 byte array list&amp;nbsp;&lt;/p&gt;
&lt;p&gt;2-)&amp;nbsp;&lt;span&gt;connect the&amp;nbsp;EVENTS_END&amp;nbsp;with the&amp;nbsp;TASKS_START&amp;nbsp;event via a PPI (is this some kind of&amp;nbsp; for auto start of dma ??)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;3-)and fork the&amp;nbsp;EVENTS_END&amp;nbsp;event to a&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/timer.html?cp=3_1_0_23#concept_xbd_hqp_sr"&gt;TIMER &amp;mdash; Timer/counter&lt;/a&gt;&amp;#39;s&amp;nbsp;TASKS_COUNT in order to increment the said counter.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;(this will count how many array has been filled in array list righ ? is this fork hw fork or sw fork?)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;4-) TIMER&amp;#39;s&amp;nbsp;EVENTS_COMPARE[x] event (i will&amp;nbsp;set this to 8 to get half transfer&amp;nbsp; ,right ?)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;if my assumes are correct i will get some kind of emulated half transfer event but by hw, is this correct ?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52832 DMA HALF TRANSFER INTERRUPT AND EASYDMA ARRAYLIST</title><link>https://devzone.nordicsemi.com/thread/208590?ContentTypeID=1</link><pubDate>Mon, 09 Sep 2019 07:57:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:01fdbf35-9b7e-4452-b9ff-6f5a06353a72</guid><dc:creator>haakonsh</dc:creator><description>&lt;ol&gt;
&lt;li&gt;There are no half transfer interrupt&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ol&gt;
[quote user=""]OR 1-16th Bytes will be stored in&amp;nbsp; 1st array and 17-32th will be in second array ?[/quote]
&lt;p&gt;&amp;nbsp;Yes. The Array List feature is fairly simple, the pointer register in f.ex. the SPIM:&amp;nbsp;&lt;a title="  RXD.PTR  " href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/spim.html?cp=3_1_0_30_5_8#register.RXD.PTR"&gt;RXD.PTR&lt;/a&gt;, is incremented by the&amp;nbsp;&lt;a title="  RXD.MAXCNT  " href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/spim.html?cp=3_1_0_30_5_9#register.RXD.MAXCNT"&gt;RXD.MAXCNT&lt;/a&gt;&amp;nbsp;size after the&amp;nbsp;&lt;span&gt;EVENTS_END has been fired. It is then up to you to trigger another&amp;nbsp;TASKS_START in order to fill the next array of&amp;nbsp;&lt;a title="  RXD.MAXCNT  " href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/spim.html?cp=3_1_0_30_5_9#register.RXD.MAXCNT"&gt;RXD.MAXCNT&lt;/a&gt;&amp;nbsp;size.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;You have to track how many&amp;nbsp;EVENTS_END&amp;nbsp;has been fired in order to know when to stop triggering the&amp;nbsp;TASKS_START. This can be done either in SW or HW. With HW you can connect the&amp;nbsp;EVENTS_END&amp;nbsp;with the&amp;nbsp;TASKS_START&amp;nbsp;event via a PPI channel, and fork the&amp;nbsp;EVENTS_END&amp;nbsp;event to a &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/timer.html?cp=3_1_0_23#concept_xbd_hqp_sr"&gt;TIMER — Timer/counter&lt;/a&gt;&amp;#39;s&amp;nbsp;TASKS_COUNT in order to increment the said counter. Then you can control the number of arrays you want by using the TIMER&amp;#39;s&amp;nbsp;EVENTS_COMPARE[x] event to trigger the&amp;nbsp;TASKS_CHG[0].DIS of a channel group that includes the PPI channel of the&amp;nbsp;EVENTS_END-&amp;gt;TASKS_START channel. This will then turn off the PPI channel that keeps the SPIM in a perpetual loop, thereby stopping it after x iterations where x is set in the TIMER&amp;#39;s &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/timer.html?cp=3_1_0_23_4_6#register.CC-0"&gt;CC[0]&lt;/a&gt;&amp;nbsp;register.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;To break it down:&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span&gt;Create a&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/ppi.html?cp=3_1_0_21#concept_sxf_21l_1s"&gt;PPI&lt;/a&gt;&amp;nbsp;channel between EVENTS_END and&amp;nbsp;TASKS_START to set up the perpetual triggering of TASKS_START.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Create a&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/ppi.html?cp=3_1_0_21#concept_sxf_21l_1s"&gt;PPI&lt;/a&gt;&amp;nbsp;channel group that only includes the PPI channel we&amp;#39;re going to use. By triggering this channel group&amp;#39;s TASKS_CHG[x].DIS you will disable the ppi channel we use to perpetually trigger&amp;nbsp;TASKS_START.&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Set up a TIMER in COUNTER mode, with a&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/timer.html?cp=3_1_0_23_4_6#register.CC-0"&gt;CC[0]&lt;/a&gt;&amp;nbsp;of how many buffers you want to transfer.&lt;/li&gt;
&lt;li&gt;Fork the PPI channel to&amp;nbsp;connect the&amp;nbsp;&lt;span&gt;EVENTS_END with the TIMER&amp;#39;s&amp;nbsp;TASKS_COUNT, in order to increment it.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Connect the TIMER&amp;#39;s&amp;nbsp;&lt;span&gt;EVENTS_COMPARE[0] to the&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/ppi.html?cp=3_1_0_21#concept_sxf_21l_1s"&gt;PPI&lt;/a&gt;&amp;#39;s&amp;nbsp;TASKS_CHG[x].DIS via a second&amp;nbsp;PPI channel. This will disable the END-&amp;gt;START ppi channel.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Fork the second PPI channel to the TIMER&amp;#39;s&amp;nbsp;&lt;span&gt;TASKS_CLEAR, in order to reset the TIMER for the next burst of transfers.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;span&gt;&lt;br /&gt;&lt;br /&gt;If you&amp;#39;re only interested in transferring 32 bytes then you do not need to use the array list feature as the maximum buffer size allowed by&amp;nbsp;&lt;a title="  RXD.MAXCNT  " href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/spim.html?cp=3_1_0_30_5_9#register.RXD.MAXCNT"&gt;RXD.MAXCNT&lt;/a&gt;&amp;nbsp;is 255 bytes.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>