How to create a spectral wave form from STM32F407?

Hi, there
I have a board STM32F407 and i want to cretate a wave form so if i will plug the output into spectrum analizer
i will get 10MHz 30Mhz 100Mhz harmonics displayed on. Is it possible to do?

One idea that i thought is to try and create such time signal in MATLAB(which FFT has such properties).
So i will have in matlab some mathematical time domain samples of the signal,
and then try and transform the samples into DAC digital values.
However, its very tough because the samples will be very close to each other. I am not sure the DAC could respond so fast.

Is there anyone give me some ideas? Many thanks.

This is probably the wrong place to ask this question, as this forum is about using Fritzing. I’d suggest a google search for “arbitrary waveform generator” which appears to be what you need. That said you are correct, the DAC in a micro is unlikely to be fast enough to generate a 10mhz wave form (assuming that 10 mhz is the base frequency.) You also may want to do a search on DDS modules such as the AD9850 which will generate arbitrary (programmable) frequency square and sine waves at up to 30mhz or so. I think there is a Fritzing part available for the AD9850 module. The square wave output will produce harmonics (as will the sine wave at smaller amplitude.) There are inexpensive boards available on ebay and sparkfun (and probably other vendors.)


I’m sorry
I still have something to say: Usual DDS are designed to generate sine waves of variable frequency.
Signals with harmonics can be generated by multiplying the DDS phase accumulator with a series of integer factors, adding optional phase offsets, feeding each harmonic phase to a sine table, scaling the sine output with amplitude factors and adding up the harmonic components for the DAC input.
For 30 MHz signal, you need > 60 MHz DAC update rate according to Nyquist, and an analog anti-alias filter.
The intended frequency range isn’t feasible with ARM processor. Considering the math effort to calculate the harmonics, I won’t expect a DAC rate above a few MHz. Alternatively an arbitrary signal table with precalculated harmonics can be replayed at a slightly higher rate.