<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Problem with DMA increment Burst (more than 1 burst) for destination peripheral (SOLVED) in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-with-DMA-increment-Burst-more-than-1-burst-for/m-p/583057#M20801</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by wmues on Sat Aug 15 14:13:01 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;If you want to write to all match registers, you have to do a destination increment.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The only time, you can do WITHOUT increment is with a FIFO. This is why your ADC example is working without source increment.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Have you thought of a DMA transfer which will reload the destination address with the start value?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Wolfgang&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 19:06:13 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T19:06:13Z</dc:date>
    <item>
      <title>Problem with DMA increment Burst (more than 1 burst) for destination peripheral (SOLVED)</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-with-DMA-increment-Burst-more-than-1-burst-for/m-p/583056#M20800</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by andersonsouza.eng on Sat Aug 15 12:15:52 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hello everyone, is my first publication here. So if i make some mistake with rules, please tell me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;And sorry for my weak english.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The board I'm using is the LPC-Link2, with a LPC4370.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My problem is with DMA, I'm trying to make a burst from a source array variable to 4 MATCHREL registers (SCT Peripheral).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The idea is simple, read the source array and do a burst of 4 words for the 4 MATHCREL, doing this continuasly, until the source ends.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Very similar, with read the ADC fifo, for example, but is the inverse. Instead of read the fifo and out into array, I want read a array and write in to the MATCHREL Registers.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem occours with use the burst and the address increment of the destination.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For example, in ADC, to read the FIFO I can do:&lt;/SPAN&gt;&lt;BR /&gt;&lt;DIV class="j-rte-table"&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca" style="border:1px solid black;background-color:#cacaca;border:1px solid black;background-color:#cacaca;background-color:#cacaca;border:1px solid black;"&gt; &lt;PRE&gt;
SRCADDR = (uint32_t) &amp;amp;LPC_ADCHS-&amp;gt;FIFO_OUTPUT[0];
DSTADDR = (uint32_t) &amp;amp;dest;
CONTROL = (8 &amp;amp; 0xFFF) //Number of Transfers (2 Transfers with 4 bursts of 32 bits)
 |0x1 &amp;lt;&amp;lt; 12 //burst size 0=1, 1=4, 2=8, 3=16, 4=32, 5=64,6=128, 7=256
 |0x1 &amp;lt;&amp;lt; 15
 |0x2 &amp;lt;&amp;lt; 18 //Transfer width 0=8bits, 1=16bits, 2=32bits
 |0x2 &amp;lt;&amp;lt; 21 //Transfer width 0=8bits, 1=16bits, 2=32bits
 |0x1 &amp;lt;&amp;lt; 24 //0 - AHB_0 (Just Memory), 1 - AHB_1(Memory+Peripherals)
 |0x0 &amp;lt;&amp;lt; 25 //0 - AHB_0 (Just Memory), 1 - AHB_1(Memory+Peripherals)
 |0x0 &amp;lt;&amp;lt; 26 // source not increment
|0x1 &amp;lt;&amp;lt; 27 // dest increment
|0x0 &amp;lt;&amp;lt; 31; //Disable Interrupt
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;SPAN&gt;After running the DMA, the resut is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;dest[0] = FIFO_OUTPUT[0]; &amp;lt;1 BURST REQUEST&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;dest[1] = FIFO_OUTPUT[1];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;dest[2] = FIFO_OUTPUT[2];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;dest[3] = FIFO_OUTPUT[3];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;dest[4] = FIFO_OUTPUT[0]; &amp;lt;2 BURST REQUEST&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;dest[5] = FIFO_OUTPUT[1];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;dest[6] = FIFO_OUTPUT[2];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;dest[7] = FIFO_OUTPUT[3];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;That is right, repair that the source increment is disabled, but the burst makes the DMA read FIFO_OUTPUT from [0] to [4], and come back to FIFO_OUTPUT[0] on the second Burst Request.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, I try to do the same for write in the MATCHREL registers from SCT peripheral.&lt;/SPAN&gt;&lt;BR /&gt;&lt;DIV class="j-rte-table"&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca" style="border:1px solid black;background-color:#cacaca;border:1px solid black;background-color:#cacaca;background-color:#cacaca;border:1px solid black;"&gt; &lt;PRE&gt;
SRCADDR = (uint32_t) &amp;amp;source;
DSTADDR = (uint32_t) &amp;amp;LPC_SCT-&amp;gt;MATCHREL;
CONTROL = (8 &amp;amp; 0xFFF) //Number of Transfers (2 Transfers with 4 bursts of 32 bits)
&amp;nbsp; |0x1 &amp;lt;&amp;lt; 12 //burst size 0=1, 1=4, 2=8, 3=16, 4=32, 5=64,6=128, 7=256
 |0x1 &amp;lt;&amp;lt; 15
&amp;nbsp; |0x2 &amp;lt;&amp;lt; 18 //Transfer width 0=8bits, 1=16bits, 2=32bits
 |0x2 &amp;lt;&amp;lt; 21 //Transfer width 0=8bits, 1=16bits, 2=32bits
 |0x0 &amp;lt;&amp;lt; 24 //0 - AHB_0 (Just Memory), 1 - AHB_1(Memory+Peripherals)
 |0x1 &amp;lt;&amp;lt; 25 //0 - AHB_0 (Just Memory), 1 - AHB_1(Memory+Peripherals)
 |0x1 &amp;lt;&amp;lt; 26 // source increment
 |0x0 &amp;lt;&amp;lt; 27 // dest not increment
 |0x0 &amp;lt;&amp;lt; 31; //Disable Interrupt
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;SPAN&gt;That results in:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;MATCHREL[0] = source[3]; &amp;lt;- 1 BURST REQUEST&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;MATCHREL[1] = 0; //not changed&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;MATCHREL[2] = 0; //not changed&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;MATCHREL[3] = 0; //not changed&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;MATCHREL[0] = source[7]; &amp;lt;- 2 BURST REQUEST&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;MATCHREL[1] = 0; //not changed&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;MATCHREL[2] = 0; //not changed&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;MATCHREL[3] = 0; //not changed&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The DMA doesn't increment the address for the destination, but the burst is set for 4 Words. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Why this is different from the ADC example ? Where the source should not increment, but increment with the Burst configuration.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If this doesn't work, the solution that I can think is to use a linked list (LLI) with destAddress aways set to MATCHREL[0] and increment the destination. This is really the best way to do that ? It will costs a lot of memory in my application.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I hope someone can help me&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;//------------------------------------------------------------------------------------------------------------------------------------------------------------------------//&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the code that I use to make this tests, it uses a software burst request (SOFTBREQ) to control when the request will ocour:&lt;/SPAN&gt;&lt;BR /&gt;&lt;DIV class="j-rte-table"&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca" style="border:1px solid black;background-color:#cacaca;border:1px solid black;background-color:#cacaca;background-color:#cacaca;border:1px solid black;"&gt; &lt;PRE&gt;
#include "board.h"

//LPC_CREG-&amp;gt;DMAMUX
#define DMAMUX_PER10_SCT_DMA_R0 (2 &amp;lt;&amp;lt; 20)// Selects DMA to peripheral connection for DMA peripheral 10.

//LPC_GPDMA-&amp;gt;CH[0].CONTROL
#define TRANSFER_SIZE(0x04 &amp;lt;&amp;lt; 0) // A write to this field sets the size of the transfer when the DMA Controller is the flow controller.
#defineSRC_BURST_SIZE_1(0x00 &amp;lt;&amp;lt; 12) // Source burst size 0=1, 1=4, 2=8, 3=16, 4=32, 5=64,6=128, 7=256
#defineSRC_BURST_SIZE_4(0x01 &amp;lt;&amp;lt; 12) // Source burst size 0=1, 1=4, 2=8, 3=16, 4=32, 5=64,6=128, 7=256
#defineSRC_BURST_SIZE_8(0x02 &amp;lt;&amp;lt; 12) // Source burst size 0=1, 1=4, 2=8, 3=16, 4=32, 5=64,6=128, 7=256

#defineDST_BURST_SIZE_1(0x00 &amp;lt;&amp;lt; 15) // Destination burst size 0=1, 1=4, 2=8, 3=16, 4=32, 5=64,6=128, 7=256
#defineDST_BURST_SIZE_4(0x01 &amp;lt;&amp;lt; 15) // Destination burst size 0=1, 1=4, 2=8, 3=16, 4=32, 5=64,6=128, 7=256
#defineDST_BURST_SIZE_8(0x02 &amp;lt;&amp;lt; 15) // Destination burst size 0=1, 1=4, 2=8, 3=16, 4=32, 5=64,6=128, 7=256

#define SRC_WIDTH_8(0x00 &amp;lt;&amp;lt; 18) // Byte (8-bit)
#define SRC_WIDTH_16(0x01 &amp;lt;&amp;lt; 18) // HalfWord (16-bit)
#define SRC_WIDTH_32(0x02 &amp;lt;&amp;lt; 18) // Word (32-bit)
#define DST_WIDTH_8(0x00 &amp;lt;&amp;lt; 21) // Byte (8-bit)
#define DST_WIDTH_16(0x01 &amp;lt;&amp;lt; 21) // halfWord (16-bit)
#define DST_WIDTH_32(0x02 &amp;lt;&amp;lt; 21) // Word (32-bit)
 //Remark: Only Master1 can access a peripheral. Master0 can only access memory.
#define SRC_USE_AHB_0(0x00 &amp;lt;&amp;lt; 24) // AHB Master 0 selected for source transfer.
#define SRC_USE_AHB_1(0x01 &amp;lt;&amp;lt; 24) // AHB Master 1 selected for source transfer.
#define DST_USE_AHB_0(0x00 &amp;lt;&amp;lt; 25) // AHB Master 0 selected for destination transfer.
#define DST_USE_AHB_1(0x01 &amp;lt;&amp;lt; 25) // AHB Master 1 selected for destination transfer.
#define SRC_INCREMENT_ENABLE(1 &amp;lt;&amp;lt; 26) // The source address is incremented after each transfer
#define SRC_INCREMENT_DISABLE(0 &amp;lt;&amp;lt; 26) // The source address is not incremented after each transfer
#define DST_INCREMENT_ENABLE(1 &amp;lt;&amp;lt; 27) // The destination address is incremented after each transfer
#define DST_INCREMENT_DISABLE(0 &amp;lt;&amp;lt; 27) // The destination address is not incremented after each transfer
#define TERMINALCT_INT_DISABLE&amp;nbsp; (0 &amp;lt;&amp;lt; 31) // The terminal count interrupt is disabled
#define TERMINALCT_INT_ENABLE&amp;nbsp; (1 &amp;lt;&amp;lt; 31) // The terminal count interrupt is enabled

//LPC_GPDMA-&amp;gt;CH[0].CONFIG
#define DMA_ENABLE(1 &amp;lt;&amp;lt; 0)
#define DMA_DISABLE(0 &amp;lt;&amp;lt; 0)
#define SRCPERIPHERAL_SCT_DMA_R0(0x0A &amp;lt;&amp;lt; 1)// SSP0 transmit/I2S0 DMA request 2/SCT DMA request 0
#define DESTPERIPHERAL_SCT_DMA_R0(0x0A &amp;lt;&amp;lt; 6)// SSP0 transmit/I2S0 DMA request 2/SCT DMA request 0
#define FLOWCONTROL_M2P_PCTRL(0x05 &amp;lt;&amp;lt; 11)// Memory to peripheral (peripheral control)
#define FLOWCONTROL_M2P_DMACTRL(0x01 &amp;lt;&amp;lt; 11)// Memory to peripheral (DMA control)
#define FLOWCONTROL_M2M_DMACTRL(0x00 &amp;lt;&amp;lt; 11)// Memory to peripheral (DMA control)
#define TERMINAL_COUNT_INTERRUPT_MASK_ENABLE(0x01 &amp;lt;&amp;lt; 15) // When cleared, this bit masks out the terminal count interrupt of the relevant channel
#define TERMINAL_COUNT_INTERRUPT_MASK_DISABLE(0x00 &amp;lt;&amp;lt; 15) // When cleared, this bit masks out the terminal count interrupt of the relevant channel
#define HALT_DISABLE(0 &amp;lt;&amp;lt; 18)// Halt disable = enable DMA Request
#define HALT_ENABLE(1 &amp;lt;&amp;lt; 18)// This value can be used with the Active and Channel Enable bits to cleanly disable a DMA channel


/*****************************************************************************
 * Private types/enumerations/variables
 ****************************************************************************/

#define SOURCEARRAYSIZE (256)


/**
 * @brief GPDMA Linker List Item structure type definition
 */
typedef struct {
uint32_t SRCADDR;/**&amp;lt; Source Address */
uint32_t DSTADDR;/**&amp;lt; Destination address */
uint32_t NextLLI;/**&amp;lt; Next LLI address, otherwise set to '0' */
uint32_t CONTROL;/**&amp;lt; GPDMA Control of this LLI */
} GPDMA_LLI_Type;
static GPDMA_LLI_Type DMA_LLI_ARRAY[200];

/* Source and destination DMA areas */
static uint32_t source[SOURCEARRAYSIZE], dest[SOURCEARRAYSIZE];

/*****************************************************************************
 * Public types/enumerations/variables
 ****************************************************************************/



/*****************************************************************************
 * Private functions
 ****************************************************************************/


static void setupDMATrigger(void)
{

/* Initialize GPDMA controller */
Chip_Clock_EnableOpts(CLK_MX_DMA, true, true, 1); //Start the clock of DMA

//Disable DMA
LPC_GPDMA-&amp;gt;CONFIG &amp;amp;= ~1;

/* Clear all DMA interrupt and error flag */
LPC_GPDMA-&amp;gt;INTTCCLEAR = 0xFF; //clears channel terminal count interrupt
LPC_GPDMA-&amp;gt;INTERRCLR = 0xFF; //clears channel error interrupt.

/* Clear all DMA interrupt and error flag */
LPC_GPDMA-&amp;gt;INTTCCLEAR = 0xFF; //clears channel terminal count interrupt
LPC_GPDMA-&amp;gt;INTERRCLR = 0xFF; //clears channel error interrupt.


LPC_GPDMA-&amp;gt;CH[0].SRCADDR = (uint32_t) &amp;amp;source;
//DMA_LLI_ARRAY[0].SRCADDR = (uint32_t) &amp;amp;LPC_ADCHS-&amp;gt;FIFO_OUTPUT;
LPC_GPDMA-&amp;gt;CH[0].DESTADDR = (uint32_t) &amp;amp;LPC_SCT-&amp;gt;MATCHREL;
//DMA_LLI_ARRAY[0].DSTADDR = (uint32_t) &amp;amp;dest;
LPC_GPDMA-&amp;gt;CH[0].LLI = 0;
LPC_GPDMA-&amp;gt;CH[0].CONTROL = (8 &amp;amp; 0xFFF) //Number of Transfers (2 Transfers with 4 bursts of 32 bits)
&amp;nbsp;&amp;nbsp;&amp;nbsp; |0x1 &amp;lt;&amp;lt; 12 //burst size 0=1, 1=4, 2=8, 3=16, 4=32, 5=64,6=128, 7=256
&amp;nbsp;&amp;nbsp; |0x1 &amp;lt;&amp;lt; 15
&amp;nbsp;&amp;nbsp;&amp;nbsp; |0x2 &amp;lt;&amp;lt; 18 //Transfer width 0=8bits, 1=16bits, 2=32bits
&amp;nbsp;&amp;nbsp; |0x2 &amp;lt;&amp;lt; 21 //Transfer width 0=8bits, 1=16bits, 2=32bits
&amp;nbsp;&amp;nbsp; |0x0 &amp;lt;&amp;lt; 24 //0 - AHB_0 (Just Memory), 1 - AHB_1(Memory+Peripherals)
&amp;nbsp;&amp;nbsp; |0x1 &amp;lt;&amp;lt; 25 //0 - AHB_0 (Just Memory), 1 - AHB_1(Memory+Peripherals)
&amp;nbsp;&amp;nbsp; |0x1 &amp;lt;&amp;lt; 26 // source increment
&amp;nbsp;&amp;nbsp; |0x0 &amp;lt;&amp;lt; 27 // dest not increment
&amp;nbsp;&amp;nbsp; |0x0 &amp;lt;&amp;lt; 31; //Disable Interrupt

LPC_GPDMA-&amp;gt;CH[0].CONFIG |= DMA_ENABLE
|DESTPERIPHERAL_SCT_DMA_R0
|0x01 &amp;lt;&amp;lt; 11 //Memory2Peripheral - DMA Control
|( (1 &amp;amp; 0x01) &amp;lt;&amp;lt; 15)
|HALT_DISABLE;


/* Enable GPDMA interrupt */
NVIC_EnableIRQ(DMA_IRQn);

//Just to make easy the identification of changes
LPC_SCT-&amp;gt;MATCHREL[0].U = (uint32_t) 0x7FFFFFFF;
LPC_SCT-&amp;gt;MATCHREL[1].U = (uint32_t) 0x7FFFFFFF;
LPC_SCT-&amp;gt;MATCHREL[2].U = (uint32_t) 0x7FFFFFFF;
LPC_SCT-&amp;gt;MATCHREL[3].U = (uint32_t) 0x7FFFFFFF;
LPC_SCT-&amp;gt;MATCHREL[4].U = (uint32_t) 0x7FFFFFFF;
LPC_SCT-&amp;gt;MATCHREL[5].U = (uint32_t) 0x7FFFFFFF;
LPC_SCT-&amp;gt;MATCHREL[6].U = (uint32_t) 0x7FFFFFFF;
LPC_SCT-&amp;gt;MATCHREL[7].U = (uint32_t) 0x7FFFFFFF;

//Enable DMA
LPC_GPDMA-&amp;gt;CONFIG |= 1;
}

/* Put some varying data in the source buffer */
static void fillSourceBuff(void)
{
int i;
static uint32_t seed;

for (i = 0; i &amp;lt; SOURCEARRAYSIZE; i++) {
seed = i + 1;
source&lt;I&gt; = seed;
dest&lt;I&gt; = 0x7FFFFFFF;
dest&lt;I&gt; = i;
}
}

/*****************************************************************************
 * Public functions
 ****************************************************************************/

/**
 * @briefDMA interrupt handler
 * @returnNothing
 */
void DMA_IRQHandler(void)
{
Board_LED_Toggle(0);
LPC_SCT-&amp;gt;MATCHREL;

if (Chip_GPDMA_Interrupt(LPC_GPDMA, 0) == SUCCESS) {
Chip_GPDMA_ClearIntPending(LPC_GPDMA, GPDMA_STATCLR_INTTC, 0);
}else{
Chip_GPDMA_ClearIntPending(LPC_GPDMA, GPDMA_STATCLR_INTERR, 0);
}
}


/**
 * @briefMain routine for DMA timer trigger example
 * @returnNothing
 */
int main(void)
{


SystemCoreClockUpdate();
Board_Init();

/* Setup source data */
fillSourceBuff();

/* Setup DMA for memory to memory transfer on timer match event */
setupDMATrigger();

/* Idle in background waiting for DMA events */
int i = 0;
while (1) {

LPC_GPDMA-&amp;gt;SOFTBREQ = 1&amp;lt;&amp;lt;10;
i++;

LPC_GPDMA-&amp;gt;SOFTBREQ = 1&amp;lt;&amp;lt;10;
i++;

}

return 0;
}

&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-337829" rel="nofollow noopener noreferrer" target="_blank"&gt;periph_dma_timertrig.c.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 19:06:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-with-DMA-increment-Burst-more-than-1-burst-for/m-p/583056#M20800</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T19:06:12Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with DMA increment Burst (more than 1 burst) for destination peripheral (SOLVED)</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-with-DMA-increment-Burst-more-than-1-burst-for/m-p/583057#M20801</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by wmues on Sat Aug 15 14:13:01 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;If you want to write to all match registers, you have to do a destination increment.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The only time, you can do WITHOUT increment is with a FIFO. This is why your ADC example is working without source increment.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Have you thought of a DMA transfer which will reload the destination address with the start value?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Wolfgang&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 19:06:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-with-DMA-increment-Burst-more-than-1-burst-for/m-p/583057#M20801</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T19:06:13Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with DMA increment Burst (more than 1 burst) for destination peripheral (SOLVED)</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-with-DMA-increment-Burst-more-than-1-burst-for/m-p/583058#M20802</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by andersonsouza.eng on Sat Aug 15 19:36:57 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hello Wolfgang,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: wmues&lt;/STRONG&gt;&lt;BR /&gt;If you want to write to all match registers, you have to do a destination increment.&lt;BR /&gt;&lt;BR /&gt;The only time, you can do WITHOUT increment is with a FIFO. This is why your ADC example is working without source increment.&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This explain a lot !!! &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Could you give a reference for that information? &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I read the UM10503 User Manual (chapters about HSADC, DMA and SCT), but I didn't see that information.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: wmues&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;Have you thought of a DMA transfer which will reload the destination address with the start value?&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Genius idea !!! .. Haha .. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I followed your tip, and have worked perfectly. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The CH1 DMA has less priority and after CH0 transfers finish, the DESTADDR of the CH0 is refreshed to the original source address. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The trigger of two channels are the same.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;DIV class="j-rte-table"&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca" style="border:1px solid black;background-color:#cacaca;"&gt; &lt;PRE&gt;
start_address = &amp;amp;LPC_SCT-&amp;gt;MATCHREL;
LPC_GPDMA-&amp;gt;CH[1].SRCADDR = (uint32_t) &amp;amp;start_address;
LPC_GPDMA-&amp;gt;CH[1].DESTADDR = (uint32_t) &amp;amp;(LPC_GPDMA-&amp;gt;CH[0].DESTADDR);
LPC_GPDMA-&amp;gt;CH[1].LLI = 0;
LPC_GPDMA-&amp;gt;CH[1].CONTROL =&amp;nbsp; (4 &amp;amp; 0xFFF) //Number of Transfers (2 Transfers with 4 bursts of 32 bits)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |0x0 &amp;lt;&amp;lt; 12 //burst size 0=1, 1=4, 2=8, 3=16, 4=32, 5=64,6=128, 7=256
&amp;nbsp;&amp;nbsp;&amp;nbsp; |0x0 &amp;lt;&amp;lt; 15
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |0x2 &amp;lt;&amp;lt; 18 //Transfer width 0=8bits, 1=16bits, 2=32bits
&amp;nbsp;&amp;nbsp;&amp;nbsp; |0x2 &amp;lt;&amp;lt; 21 //Transfer width 0=8bits, 1=16bits, 2=32bits
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |0x0 &amp;lt;&amp;lt; 24 //0 - AHB_0 (Just Memory), 1 - AHB_1(Memory+Peripherals)
&amp;nbsp;&amp;nbsp;&amp;nbsp; |0x1 &amp;lt;&amp;lt; 25 //0 - AHB_0 (Just Memory), 1 - AHB_1(Memory+Peripherals)
&amp;nbsp;&amp;nbsp;&amp;nbsp; |0x0 &amp;lt;&amp;lt; 26 // source not increment
&amp;nbsp;&amp;nbsp;&amp;nbsp; |0x0 &amp;lt;&amp;lt; 27 // dest not increment
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |0x0 &amp;lt;&amp;lt; 31; //Disable Interrupt
LPC_GPDMA-&amp;gt;CH[1].CONFIG = DMA_ENABLE
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |DESTPERIPHERAL_SCT_DMA_R0
&amp;nbsp;&amp;nbsp; |0x01 &amp;lt;&amp;lt; 11 //Memory2Peripheral - DMA Control
&amp;nbsp;&amp;nbsp; |( (1 &amp;amp; 0x01) &amp;lt;&amp;lt; 15)
&amp;nbsp;&amp;nbsp; |HALT_DISABLE;


LPC_GPDMA-&amp;gt;CH[0].SRCADDR = (uint32_t) &amp;amp;source;
LPC_GPDMA-&amp;gt;CH[0].DESTADDR = (uint32_t) &amp;amp;LPC_SCT-&amp;gt;MATCHREL;
LPC_GPDMA-&amp;gt;CH[0].LLI = 0;
LPC_GPDMA-&amp;gt;CH[0].CONTROL = (16 &amp;amp; 0xFFF) //Number of Transfers (2 Transfers with 4 bursts of 32 bits)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |0x1 &amp;lt;&amp;lt; 12 //burst size 0=1, 1=4, 2=8, 3=16, 4=32, 5=64,6=128, 7=256
&amp;nbsp;&amp;nbsp;&amp;nbsp; |0x1 &amp;lt;&amp;lt; 15
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |0x2 &amp;lt;&amp;lt; 18 //Transfer width 0=8bits, 1=16bits, 2=32bits
&amp;nbsp;&amp;nbsp;&amp;nbsp; |0x2 &amp;lt;&amp;lt; 21 //Transfer width 0=8bits, 1=16bits, 2=32bits
&amp;nbsp;&amp;nbsp;&amp;nbsp; |0x0 &amp;lt;&amp;lt; 24 //0 - AHB_0 (Just Memory), 1 - AHB_1(Memory+Peripherals)
&amp;nbsp;&amp;nbsp; |0x1 &amp;lt;&amp;lt; 25 //0 - AHB_0 (Just Memory), 1 - AHB_1(Memory+Peripherals)
&amp;nbsp;&amp;nbsp; |0x1 &amp;lt;&amp;lt; 26 // source increment
&amp;nbsp;&amp;nbsp; |0x1 &amp;lt;&amp;lt; 27 // dest increment
&amp;nbsp;&amp;nbsp; |0x1 &amp;lt;&amp;lt; 31; //Disable Interrupt

LPC_GPDMA-&amp;gt;CH[0].CONFIG = DMA_ENABLE
|DESTPERIPHERAL_SCT_DMA_R0
|0x01 &amp;lt;&amp;lt; 11 //Memory2Peripheral - DMA Control
|( (1 &amp;amp; 0x01) &amp;lt;&amp;lt; 15)
|HALT_DISABLE;

&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the reply,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It was very helpful&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Anderson.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 19:06:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-with-DMA-increment-Burst-more-than-1-burst-for/m-p/583058#M20802</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T19:06:14Z</dc:date>
    </item>
  </channel>
</rss>

