2014-03-19 11:43 AM
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 regards2014-03-19 12:09 PM
How many points are there in the wave table? This and your time base set up will directly impact the speed. The upper limit will be the bandwidth of the DMA operation, or the pin driver.
I think it's certainly possible to generate waves over 1-2 MHz, perhaps up to 10 MHz2014-03-19 12:21 PM
I would like to create a 1.5 MHz Sine Wave using TIMER + DAC + DMA.
In addition to clive's hints, you will definitely need to check the DAC output settling time specified in the datasheet. I don't know the F42x part, but the DAC of other STM32 MCUs had times in the range of several microseconds, definitely not capable of >= 1MHz output.
2014-03-20 03:06 AM
Dear All,
the Sine Wave has 32 points.Regarding the DAC output settings I have searched on the STM32F42X datasheet, but I have not found this information.Where can I find this information?Let me know!Best regards2014-03-20 04:06 AM
Hi
''the Sine Wave has 32 points. Regarding the DAC output settings I have searched on the STM32F42X datasheet, but I have not found this information. Where can I find this information?'' You are not understanding what fm is telling you. ''In addition to clive's hints, you will definitely need to check the DAC output settling time specified in the datasheet.'' Look at the DATASHEET (not the reference manual) : In section ''DAC electrical characteristics'' In the table : look for ''tSETTLING'' and ''Update rate'' The 'update rate' tells you the maximum rate of change (small steps) the DAC is capable of (ie the max frequence it can generate) The 'tSETTLING' tells you the time the DAC output needs to go to the final voltage if it does a large voltage jump. This can also limit the maximum frequency the DAC can generate.2014-03-20 04:25 AM
Where can I find this information?
For the STM32F27x/F29x, it is page 160 ofthe datasheet (DM00071990.pdf): I wouldn't expect better data for other F4xx parts...
2014-03-20 05:04 AM
Hi fm
We are using the STM32405 for the project where I work. It has the same spec for the DAC as you pasted (by the way how do I paste pictures? ) I just looked up the STM32F427x/STM32F429xx data sheet. Surprise, surprise - it is the same. http://www.st.com/web/en/resource/technical/document/datasheet/DM00071990.pdf2014-03-20 06:14 AM
I just looked up the STM32F427x/STM32F429xx data sheet.
Surprise, surprise - it is the same.
As I found out last year, ST even Copy-&-Past's peripheral components between STM8 and STM32 parts. It makes sense IMHO.It has the same spec for the DAC as you pasted (by the way how do I paste pictures? )
It involves the ''Picture manager'' in the menu, but you need to upload the image in the process. The image itself was prepared with a screenshot tool before. And BTW, the forum software crashed me again at the first try ... ... and again during this post (shame on ST !)
2014-03-20 05:01 PM
Dear All,
I have checked the datasheet and the STM32F427XX / STM32F429XX have the same values. How could I create a 1.5MHz Sine Wave? Using PWM?Let me know!Best regards2014-03-20 06:32 PM
darth.vader created a VGA Video DAC using a resistor ladder implementation.