I am trying to generate a complex PWM using two SCT channels. They have to be synchronized so I am using MATCHREL[1] and MATCHREL[2], and DMA to load the new values sequentially from memory per trigger - this seems to work perfectly for a single register, with DMA0_CFG register set to BURSTPOWER = 0, and no wrap settings (SRCBURSTWRAP and DSTBURSTWRAP set to 0).
However, with BURSTPOWER = 1 (2^1 transfers), DSTBURSTWRAP = 1, and DMA destination set to MATCHREL[1], two transfers occur, but as far as I could verify only MATCHREL[1] is written twice.
Are there any limitations on the behavior of DSTBURSTWRAP? I assumed that it would use the WIDTH value of the XFERCFG register and increase the destination accordingly, resetting once the burst was completed, but this doesn't seem to be the case. How is the transfer width of the sequential writes decided?
On that note, how does XFERCFG DSTINC value affects DSTBURSTWRAP? With DSTINC set to a value different from 0, I know that at least it writes sequentially to addresses but the wrap functionality goes ignored (as far as I can reason) - at the very least i know it writes to MATCHREL[3] since that controls a different subsystem.
Here is an snippet for the current DMA settings (uses old LPCOpen nomenclature) - as stated above, to me the end result is double writes to MATCHREL[1]:
#define HRES (104)
(...)
LPC_DMA->SRAMBASE = Chip_DMA_Table;
Chip_DMA_Table[0].dest = (uint32_t) &LPC_SCT->MATCHREL[1].U;
Chip_DMA_Table[0].source = (uint32_t) &scandata[HRES];
(...)
LPC_DMA->DMACH[0].CFG = (1 << 1) | (1 << 4) | (1 << 6) | (1 << 8 )| (0 << 14) | (1 << 15);
LPC_DMA->DMACH[0].XFERCFG = (1 << 0) | (2 << 8 )| (1 << 12) | (0 << 14) | ((HRES-1) << 16);