+ Post New Thread
Results 1 to 5 of 5
  1. #1
    Junior Member level 2
    Points: 207, Level: 2

    Join Date
    Oct 2019
    Location
    Columbus, Ohio, USA
    Posts
    22
    Helped
    0 / 0
    Points
    207
    Level
    2

    How to generate a sine waveform using a STM32 Nucleo-64?

    Hello Everyone,

    I have a STM32F446 Nucleo-64 and I want to generate a sine waveform at 13.56 MHz. I would like to know if there is available code in which I can set the sine wave frequency.

    Many thanks in advance.

    •   AltAdvertisement

        
       

  2. #2
    Advanced Member level 5
    Points: 25,005, Level: 38
    barry's Avatar
    Join Date
    Mar 2005
    Location
    California, USA
    Posts
    4,790
    Helped
    1061 / 1061
    Points
    25,005
    Level
    38

    Re: How to generate a sine waveform using a STM32 Nucleo-64?

    You're going to have a pretty rough sinewave since the maximum sampling frequency you can have is 48MHz. (Not even sure if the onboard DAC can run at the frequency).


    1 members found this post helpful.

    •   AltAdvertisement

        
       

  3. #3
    Junior Member level 2
    Points: 207, Level: 2

    Join Date
    Oct 2019
    Location
    Columbus, Ohio, USA
    Posts
    22
    Helped
    0 / 0
    Points
    207
    Level
    2

    Re: How to generate a sine waveform using a STM32 Nucleo-64?

    Quote Originally Posted by barry View Post
    You're going to have a pretty rough sinewave since the maximum sampling frequency you can have is 48MHz. (Not even sure if the onboard DAC can run at the frequency).
    I gotta. Well, a FPGA looks better for my application. Thanks much.



    •   AltAdvertisement

        
       

  4. #4
    Super Moderator
    Points: 265,394, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    46,372
    Helped
    14114 / 14114
    Points
    265,394
    Level
    100

    Re: How to generate a sine waveform using a STM32 Nucleo-64?

    Sine wave, how? Generating a square wave and applying a low pass filter?

    For 13.56 MHz, you need a suitable crystal that can generate the frequency by rational operations. Near to 13.56 MHz can be possibly achieved by unusual PLL programming, you can try out with the CubeMX tool.

    - - - Updated - - -

    Not even sure if the onboard DAC can run at the frequency
    Definitely not, 1 MHz DAC small signal bandwidth.


    1 members found this post helpful.

  5. #5
    Advanced Member level 5
    Points: 25,005, Level: 38
    barry's Avatar
    Join Date
    Mar 2005
    Location
    California, USA
    Posts
    4,790
    Helped
    1061 / 1061
    Points
    25,005
    Level
    38

    Re: How to generate a sine waveform using a STM32 Nucleo-64?

    Quote Originally Posted by FvM View Post
    Sine wave, how? Generating a square wave and applying a low pass filter?

    For 13.56 MHz, you need a suitable crystal that can generate the frequency by rational operations. Near to 13.56 MHz can be possibly achieved by unusual PLL programming, you can try out with the CubeMX tool.

    - - - Updated - - -


    Definitely not, 1 MHz DAC small signal bandwidth.
    You can also generate a sinewave with a lookup table and counter (DDS). You don't have to use rational functions. But that 1MHz DAC will be a problem...


    1 members found this post helpful.

--[[ ]]--