Skip to main content
Graduate II
February 17, 2025
Solved

ADC measuring only high side of Centered Mode PWM (HRTIM)

  • February 17, 2025
  • 2 replies
  • 933 views

Im building some phase shifting control sensing for a Dual Active Bridge.

Im using TIMA and TIMD (shown in pictures) in retrigerable single mode, both signals are triggered by sepparate CR from the master timer. https://community.st.com/t5/stm32-mcus-products/synching-hrtim-s-tima-and-timb/td-p/770972

Javier1_2-1739803161954.png

Im trying to trigger ADC measurements only on the high side of the PWM but im getting low side aswel.

Javier1_0-1739802900642.png

:( , i dont want those 0s there

 

Javier1_1-1739803284839.png

 

Is there any way of using PWM in centered mode and also just triggering ADC measurements in high PWM period?

    This topic has been closed for replies.
    Best answer by Javier1

    I managed, I just setup extra CR3 in TIMERA dedicated exclusively to trigger ADCs, then CR3 setup == timer period

    Javier1_0-1739870599802.png

    that way i get the ADC measurements exactly where i want them , fitting well with the phase shift modulation.

    ADCphaseshift.gif

    Javier1_1-1739870834098.png

     

    2 replies

    Javier1Author
    Graduate II
    February 17, 2025

    if i do ADC sampling just when master timer updates i loose the center of the PWM cycle when doind the phase shifting

    Javier1_0-1739808335684.png

     

    Javier1AuthorAnswer
    Graduate II
    February 18, 2025

    I managed, I just setup extra CR3 in TIMERA dedicated exclusively to trigger ADCs, then CR3 setup == timer period

    Javier1_0-1739870599802.png

    that way i get the ADC measurements exactly where i want them , fitting well with the phase shift modulation.

    ADCphaseshift.gif

    Javier1_1-1739870834098.png