Skip to main content
Visitor II
May 7, 2024
Question

DAC trigger by HRTIM

  • May 7, 2024
  • 1 reply
  • 1114 views

Hi,

 

I need to trigger DAC1 and DAC2 from HRTIM Timer A on a STM32G474. I have set the DAC Sync option inside the HRTIM Timer A settting to generate a DACTrigOut1 event that triggers my DAC1. But DAC has a separate Trigger event that also works for DAC2 if set in TimerA seetings. It either triggers DAC1(DACTrigOut1) or DAC2 (DACTrigOut2), but I cabt find a setting to trigger both DAC simultaneously. Is there a option for that?

Thank you guys for any hint on that!

Benedikt

    This topic has been closed for replies.

    1 reply

    ST Employee
    June 3, 2024

    Hello, 

    DAC updates are indeed generated by hrtim_dac_trgx output, and for each timer unit we select what signal to trigger using DACSYNC. So indeed, triggering DAC1 and DAC2 with the same Timer unit seems not doable. 

    As a workaround, you can enable an additional Timer unit (without output for instance) and links its update with Timer A update (see STM32cubeMx: Update Trigger Sources Selection), and then use this update as a trigger for the other DAC.

    I hope it helps.

    Best regards.