cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F103ZET6-TIM1-Output AB pulse

XHuai
Associate

When I use the TIM1 peripheral of the STM32F103ZET6 chip, when using the flip mode, OC1M = OC2M = 3, ARR = 300, CCR1 = 150, CCR2 = 300, but the first edge is all output high at the same time, theoretically The OC1 channel will output the high level ahead of the OC2 channel, that is, 90 degrees ahead.

3 REPLIES 3

Sorry, I don't understand, what is the question?

Is the resulting waveform different from the expected one? Maybe try drawing timing diagrams or post screenshot of oscilloscope or logic analyzer.

JW

XHuai
Associate

0693W000007ZUD8QAO.jpgI'm sorry, I just went on a business trip today. There is no waveform in my photo album, but I painted one by hand. The relevant settings are shown in the figure 0693W000007ZUCZQA4.png

Thanks, this is clear.

Try setting the CCRx registers *before* you set CCMRx registers.

JW