Skip to main content
Visitor II
June 7, 2025
Question

Unusual signal pattern at the output of STM32G474 DAC3

  • June 7, 2025
  • 2 replies
  • 1187 views

Hello,

I am implementing a sine wave generator based on the high-speed DAC3 of the G474.

The DAC is in double-DMA mode and its conversions are triggered periodically  by a timer.
Sample and Hold is disabled.

The DAC is connected to an external pin by an OPAMP in the follower mode.

What could be the reason for the downward slope shown on the picture? It is consistent even at low conversion speeds.

Thank you for your help.

 

    This topic has been closed for replies.

    2 replies

    Super User
    June 7, 2025

    Why not using sample&hold?

    From the reference manual: " In sample and hold mode, the DAC core converts data on a triggered conversion, and then holds the converted voltage on a capacitor. When not converting, the DAC cores and buffer
    are completely turned off between samples and the DAC output is tri-stated, therefore
    reducing the overall power consumption."

    hth

    KnarfB

    imalamoudAuthor
    Visitor II
    June 9, 2025

    Thank you for your suggestion.

    I tried to enable SAH before posting but did not see any changes in the signal pattern.

    Can you please point to a sample HAL configuration of SAH feature?

    Additionally is SAH compatible with DDMA mode and the highest possible conversion speed?
    I would like to get 1MHz sine wave thus 16M samples conversion.

    Thanks,

    Ilia

    Explorer
    June 7, 2025

    I'd check opamp first, configuring as standalone and applying external signal.

    Btw, have you done dac & opamp calibration?

    imalamoudAuthor
    Visitor II
    June 9, 2025

    Thank you for this idea.
    However, the signal pattern does not depend on a G474 chip sample. So a defective opamp is unlikely.

    Explorer
    June 9, 2025

    Post your code, schematics and pictures of hardware set-up, how to reproduce this abnormality