Skip to main content
Associate
August 1, 2023
Question

STM32H735G-DK digital signal processing

  • August 1, 2023
  • 1 reply
  • 1253 views

I am using STM32H735G-DK for signal processing. I input a 10KHZ sine wave with an amplitude of 1V from a signal generator. Using STM32H735G-DK with a sampling rate of 48000HZ, I square the sine wave and output it to an oscilloscope. However, there is a significant discrepancy between the output waveform and the calculated waveform. I would like to know what might not have been set correctly?"

    This topic has been closed for replies.

    1 reply

    Piranha
    Principal III
    August 7, 2023

    You cannot see a 10 kHz square wave with a 48 kHz sample rate, because of this:

    https://en.wikipedia.org/wiki/Square_wave#Fourier_analysis

    So what you see is the base 10 kHz sine with a 30 kHz aliased around 24 kHz and resulting in 18 kHz. Ideally you should see just the 10 kHz sine, but the hardware low-pass filters are not perfect. Actually, if you would see a 10 kHz square wave, it would mean that the DAC implementation is extremely bad.