cancel
Showing results for 
Search instead for 
Did you mean: 

G4 HRTIM configuration problem

CJARD.1
Associate

Hi,

I'm currently using HRTIM on a STM32G474RE and I'm facing a configuration problem.

Context :

The HRTIM is used to produce 2 push-pull PWM outputs from Timer A. The 2 outputs are configured the same way :

  • 1 Set source : Timer period event
  • 2 Reset source : Timer compare 4 and External Event 4.

External Event 4 is configured with the following logic :

  • Source : COMP1 out
  • Polarity : High
  • Sensitivity : LEVEL
  • FAST MODE : disabled

More over, this external event is filtered using a "blanking", generated from compare 1 timer unit. Event is ignored if it happens during the blanking.

The problem:

In this configuration, the outputs stays at low level, no matter the state of COMP1.

If I change the sensitivity of the external event, I get the desired output. PWMs are resetted as soon as COMP1 is high.

Any suggestions ?

Thank you 🙂0693W00000Hpkm1QAB.png0693W00000HpklcQAB.png

1 REPLY 1
WWANG.1
ST Employee

What's the value about CMP4?

According to RM0440 Chapter 27.3.7,When set and reset requests from two different sources are simultaneous, the reset action

has the highest priority.

COMP1_OUT high level duration is 7.956us, in this time may will generate Timer period event(1 Set source).

If all the Timer period event generate in COMP1_OUT =High, PWM output will always LOW.

you can set more than one SET source test it again.