2017-08-12 08:43 AM
Hi guys,
Iam trying to set up highest resolution on DAC as possible. If iam right there should be 10Msps DAC. so in 12b resolution i should get output samples 833 333.3ps. Timer (in my case TIM6) is clocked by internal cloch APB (80MHz) and DAC needs 10MHz clock for full speed. i've setted prescaler to 0 and autoreload value to 8 (0x07) but i get underrun error. What iam doing wrong?
Many thanks for help.
#dma #tim #dac2017-08-12 10:35 AM
>>What i am doing wrong?
Without code illustrating the issue it's hard to guess.
If you drop the speed at what point does the underrun stop occurring? Does it work at 1 MHz?
Is the DMA using the right channel?
Is the pattern buffer in the fastest SRAM?
2017-08-12 01:22 PM
I will past the code later cause iam not on my pc now but the code works. Dac generated sine but i get the dma underrun.
I do not know how to assign pattern to the different ram space.
Are my supposions about calculated speed of dac correct?
Fmax=(10Msps/12bit)/count_of_samples_per_vawe
Many thanks
2017-08-12 05:27 PM
2017-08-14 11:01 AM
Well,
I've found issue in STMCubeMX and also in reference manual.
Tim6 & Tim7 does not support One pulse mode! They do not have CCR registers thus they are not able to make rising edge for pulse. In GUI of STMCubeMX is checkbox to activate one pulse mode.