cancel
Showing results for 
Search instead for 
Did you mean: 

COMP and blanking Function

FlavioB
Associate II

Hi all,

I am having some problems connecting a comparator to a TIMER using its blanking function (as described in the AN4232 application note).

I've read the COMP_OutputBlanking example found in the STM32G4 repository projects (I'm using a STM32G431).

If I don't enable the blanking function in the comparator setup, the system works fine:

  • The comparator output works as expected
  • The PWM channels (TIM2_CH1 and TIM2_CH3) work as expected.

After enabling the comparator blanking function on TIM2_CH3:

 

hcomp1.Init.BlankingSrce = COMP_BLANKINGSRC_TIM2_OC3_COMP1;

 

The comparator output stops working and the TIM2_CH3 channel does not seem to be affected by the comparator.

A strange thing, if I don't start the TIM2_CH3 the comparator output works fine (even if the blanking function is enabled).

 

What am I doing wrong?

 

Regards,

 

Flavio

 

2 REPLIES 2
FlavioB
Associate II

I add an osciloscope image to better explain the text above

 

SCR02.PNG

 

 

FlavioB
Associate II

I also attach the TIMER and COMP register, they seem to be configured well:

Senzanome.jpg

 

I'm starting to suspect a bug in the hardware design of the STM32G431 ?