I'm programming an STM32F4 Discovery board to push a sequence of 12 bit values into the DAC data register. This works well using timer interrupts: inside my IRQ handler, I have code that looks like:
phase += phaseIncrement;
DAC_SetChannel1Data(DAC_Align_12b_R, function[phase]);
and the output of the DAC looks like I think it should. Note that phaseIncrement
doesn't have to be 1
- if I want a high frequency output, I can skip points in function[]
, sacrificing the accuracy of the signal for a bit of extra speed.
Now, I am reading about DMA. It looks like the STM32F4 can only increment by one of three amounts - 1 byte, 2 bytes, and 4 bytes, depending on the size of the variable being transferred. Is this correct? Is there a workaround that will let me skip some of these memory addresses so that I can emulate my current output without less CPU usage?