2021-02-24 06:42 PM
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.
2021-02-25 12:15 AM
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
2021-02-25 06:57 AM
I'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
2021-02-25 10:00 AM
Thanks, this is clear.
Try setting the CCRx registers *before* you set CCMRx registers.
JW