How does the Timer - DMA - Look up table to DAC index get set? Is it possible to change the index
I have a project where I'm using a Nucloe G474RE to produce a sine wave, all is working great; I have an array of 2500 values which produce a SINE wave starting at 0 degrees; I would like to add 2 further Sine waves starting 120 and 240 degrees later.
To do this, I could create 2 additional arrays with the values shifted to reflect the 120-degree and 240 degrees shift, but I was wondering whether I could use one array and produce the remaining 2 arrays by preloading the index the timer produces for phase 2 and 3 , indexing, reading and sending the value to the 2nd and 3rd DAC output.
Is this achievable
Thanks for any guidance
Nick
I think I know how this could work, but I have to set the registers manually rather than using the HAL,
The HAL seems to hide the details on how to set the source address,
DMA1_Channel1->CPAR = (unint32_t(&dataArray[index_to_start_from); //DMA in circular mode.
Can I override this in the Cubemx generated project, or do I need to code without using CubeMX
Thanks
Nick

