2010-07-18 09:55 AM
Two shifted PWM
2011-05-17 04:59 AM
Hello,
To obtain 2 PWM like your diagram, I think you must use 2 Timer. PWM2 is a standard PWM from TIM2 for example. PWM1 must use one-pulse mode (see documentation) from TIM3 for exemple. You must use a Timer synchronisation from TIM2 to TIM3 to start (trigger) TIM3 with a event on TIM2. Another solution is to use the 2 Timer with a standard PWM and to program CNT register of a Timer with Period / 2 while CNT register of other Timer is 0. After that you must start the 2 Timer at the same time. Exactly at the same time is not possible but with a small assembly routine you can have the 2 STR instructions which write to the 2 CR1 registers very close to. With Timer synchornisation, you can also use a third Timer only to start at the same time the 2 others Timers. For example, a trigger out from TIM4 can start TIM2 and TIM3. Regards Eric2011-05-17 04:59 AM
Hi tekin,
I can't understand your chronogram. Can you re-edit it to be clearer ? MCU Lüfter,2011-05-17 04:59 AM
Copy it into notepad and reformat font as Arial or Times New Roman.
John F.