Skip to main content
Visitor II
April 3, 2024
Question

COMP and blanking Function

  • April 3, 2024
  • 2 replies
  • 1272 views

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

 

    This topic has been closed for replies.

    2 replies

    FlavioBAuthor
    Visitor II
    April 3, 2024

    I add an osciloscope image to better explain the text above

     

    SCR02.PNG

     

     

    FlavioBAuthor
    Visitor II
    April 4, 2024

    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 ?