2014-10-04 01:23 PM
Reference:
RM0090STM32F407xx Reference ManualRev6Section 17.4.7TIMxCCMR1->OC1M--PWM Mode 1,2Quote:''2: In PWM mode 1 or 2, the OCREF level changes only when the result of the comparison changes or when the output compare mode switches from “frozen�? mode to “PWM�? mode.''Does this mean the the OCxRef signal will be asserted as soon as you select a PWM mode, or only PWM mode 1? I am using PWM2 to trigger a 1-pulse timer while looking at the output on an oscilloscope. The output is indicating that I am getting an extra pulse when I enable the timers, which would be explained by this effect.Is it possible to clear the OCxREF signal?2014-10-06 06:23 AM
On further inspection, the reason that I was getting an extra pulse out was because I was enabling my one-pulse timer in my init routine.
After doing more testing, it looks like enabling a timer with PWM1 set will immediately set the OCxREF signal. If the timer is set with PWM2, this will not happen.My original question still is, can you control the OCxREF signal. If I set up an timer with PWM1 and then enable it, it will immediately set the OCxREF signal. If I am using it as a trigger for another timer and do not want the initial trigger to happen, can I somehow kill it before configuring the second timer?