cancel
Showing results for 
Search instead for 
Did you mean: 

DMA: Start transfer from address + offset

GChri.2
Associate II

Hi, 

I want to use my F072's DACs to output a sin and cos signal. to save on memory I want to have only one buffer holding the values of a SIN function, COS values should be taken from the same buffer. Basically, I need the DMA for channel 1 to start from the beginning of the buffer and for channel 2 to start at an offset. Of course, I can't just do something like 

HAL_DAC_Start_DMA(&hdac1, DAC_CHANNEL_1, lut, no_samples, DAC_ALIGN_12B_R);
HAL_DAC_Start_DMA(&hdac1, DAC_CHANNEL_2, lut + no_amples / 4, no_samples, DAC_ALIGN_12B_R);

because that would make the dma access elements outside the buffer. 

in the reference manual I found the register DMA_CNDTRx register, is this the way to go? 

0 REPLIES 0