lpcware

DMA problem with DAC in LPC1549

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 18, 2016 by lpcware
Content originally posted in LPCWare by enrico cortelazzo on Wed May 11 06:24:31 MST 2016
Hello,
I have a problem with DMA.
I'm using LPC1549JBP100.
I am using a DAC with autoreload timer, a PWM (with SCT0) and DMA 13 to create a slope synchronaized with the PWM using the ping-pong technic.
The setting are correct and all works ok for some periods, but after a variable number of cycles the DMA stops working. I test the register when the DMA stops and I note that the DMA stops every time after the first data transfer. Infact I need to transfer 20 words and I load XFERCOUNT (bit 16..25) of XFERCFG[13] to 19, but when DMA stops I read 18 in this bits.
As you can see in the plot infact the yellow waveform stops at the high level that corrisponds to first value of my table (the table has 20 values, the first is high, then there are 18 values corrispond to the down slope and the least value is 0). All other register appear correct. During the process I don't write to any register and the CPU is running, all other perifherics continue to works correctly. Have any suggestion? thanks
enrico

Outcomes