cancel
Showing results for 
Search instead for 
Did you mean: 

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

Javier1
Principal

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?

Available for consulting/freelancing , hit me up in https://github.com/javiBajoCero
1 ACCEPTED SOLUTION

Accepted Solutions
Javier1
Principal

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

 

Available for consulting/freelancing , hit me up in https://github.com/javiBajoCero

View solution in original post

2 REPLIES 2
Javier1
Principal

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

 

Available for consulting/freelancing , hit me up in https://github.com/javiBajoCero
Javier1
Principal

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

 

Available for consulting/freelancing , hit me up in https://github.com/javiBajoCero