cancel
Showing results for 
Search instead for 
Did you mean: 

Help to find a suitable configuration for PWM + COMP + DAC

Hi community,

I am struggling to find how (or if) is possible to use the TIM1 (advanced control timer) of the STM32FG071 to run a hysteretic current regulator completely in hardware (without relying on software)

The idea is to use both comparators of the chip together with the 2 values of the DAC to set maximal e minimal current values, and then feed the current signal to the input of both comparators and let this information control the set /reset of the OC1 & OC1N outputs (to also take advantage of the deadtime), therefore controlling both frequency and duty cicle of the output stage.

As shown in this image:

0690X00000ByIsjQAF.jpg

The problem is that the due to the fairly complex control of this timer module and all its possible configurations I am not even able to conclude if it's feasible or not, I've already thought about using One Pulse Mode, OCREF_CLR, Gated mode and Break inputs, but the more I read the more complex it gets..

My question goes to the ones that are already experienced with the advanced parts of this timer, is this idea feasible? if yes, which features should I combine to put it to work?

OPM + OCREF_CLR ?

OPM + BRK ?

TRGI + OCREF_CLR ?

TRGI + BRK ?

what else could work ?

Thank you all in advance

Best Regards

Gustavo

21 REPLIES 21

Hi @Vincent Onde​ ,

Thank you for the clarification.

Jan

Thank you Vincent for the clarification!

And thanks Jan for the help

BR

Gustavo