Skip to main content
Associate III
March 19, 2014
Question

STM32F42X - TIMER + DAC + DMA: SINE WAVE

  • March 19, 2014
  • 11 replies
  • 2920 views
Posted on March 19, 2014 at 19:43

Dear All,

I would like to create a 1.5 MHz Sine Wave using TIMER + DAC + DMA.

I have started from the DAC_SignalsGeneration example for Discovery board and then I have modified the TIM_TimeBaseStructure.TIM_Period  from 0xFF to 1.

I have done the measurement with the oscilloscope and in the first case (Period = 0xFF) the sine wave has a frequency of 11kHz and in the second case (Period = 1) the sine wave has a frequency of 350kHz. Sincerly I thought to obtain an higher frequency because the period is 255 times lower. Could anyone explain this behaviour? 

Then I would like to know if it is possible to create a 1.5 MHz Sine Wave with Timer + DAC + DMA or if it is better to use a different solution.

Let me know!

Best regards
    This topic has been closed for replies.

    11 replies

    Tesla DeLorean
    Guru
    March 29, 2014
    Posted on March 29, 2014 at 19:18

    Are there some other design goals? Or an ability to use some other part to generate this signal?

    What's the issue with using a

    http://www.tek.com/blog/tutorial-digital-analog-conversion-%E2%80%93-r-2r-dac

    , attached to 6 or 8 GPIO pins, with 32 samples clocked at 48 MHz using TIM/DMA?
    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..