Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

PSoC™ 5, 3 & 1 Forum Discussions

Anonymous
Not applicable

Currently I am taking 16 bit waveform data stored in an array, splitting it into two 8 bit bytes, and sending to two control registers. This works great, but I want the DMA to do this so I do not have to run the waveform in a forever loop. See the current wave generating code below.

while(1)

{

Wave_Data_MSB_Write(MSBData);

Wave_Data_LSB_Write(LSBData);

CyDelayCycles(var_delay);

i++;

}

Could someone guide me to do this with the DMA? I attached a picture of the control register set up... I placed DMAs as I think they would be used. I added Status regs but I do not think I even need them. I just want the data to stream over to the control registers. I will adjust the speed with the clocks after it is working...

pastedImage_0.png

pastedImage_0.png

pastedImage_1.png

I do not know what to do here...

pastedImage_2.png

0 Likes
1 Solution
2 Replies
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted

Please take a look at this example of data transfer from 32-bit array to 3x 8-bit destinations (2xVDAC + ControlReg).

Re: How do I change the phase of a sine wave generated by a DMA? 

You can easily modify it for 16-bit to 2x8-bit DMA transfer.

/odissey1

DMA8x3_01a.png