cancel
Showing results for 
Search instead for 
Did you mean: 

Changing DAC DMA data

brett
Associate II
Posted on February 05, 2014 at 13:44

I have an array of data being played out of a DAC using DMA transfer, with the trigger provided by a timer (TIM6). This works fine, but I would like to occasionally change the data at run time. To do this I have created another array with the other set of data. I then call a function which:

-disables the timer

-deinitialises the dac and the dma

-initialises the dac and the dma, with the dma base address set to the address of the new data

-re-enables the timer

I call this function the very first time I am setting up the DAC and it works fine. However, once I try to change the data by calling this function again, the DAC stops outputting a waveform and I need to reset the processor before it will work again.

Does anyone know why this might be happening? Is there something obvious I am missing?

Any help or thoughts appreciated, thank you.

#dac-dma
0 REPLIES 0