cancel
Showing results for 
Search instead for 
Did you mean: 

stm32g474 hrtimer issue

FXuef.1
Associate II

I meet a confused and unresonable issue about hrtimer with stm32g474mbt6.

condition:

1).use timerA to generate 2 channel pwm. Channel 1 is set by CMP1, reset by CMP2; Channel 2 is set by CMP3, reset by CMP4;

2). enable preload function, update when reset and repetition.

issue description:

1). as shown in picture1, red line is a current signal controlled by pwm, yellow line is MCU's DAC ouput(means the value of timerA's CMP2 minus CMP1). theoretically when (CMP2-CMP0)=0, timerA has no pwm output, and the red line should be zero at the same time.

2). as shown in picture2, red line is current siganl similarly, yellow line is timerA's pwm output. Combined picture1&2, when (CMP2-CMP0)=0, it seems that the timerA is working abnormally.

I don't know it is MCU's issue or software mistake.

so thanks!

picture1

0693W00000bhGTxQAM.pngpicture2

0693W00000bhGSWQA2.png

0 REPLIES 0