2024-04-02 11:50 PM
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:
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
2024-04-03 02:15 AM
I add an osciloscope image to better explain the text above
2024-04-04 01:57 AM
I also attach the TIMER and COMP register, they seem to be configured well:
I'm starting to suspect a bug in the hardware design of the STM32G431 ?