2015-06-28 08:36 AM
Hi,
I would like to generate 2 PWM @ 6KHz, but i would like to have a delay between the PWMs of 5uS. I thought of using two different timers for the mission (each for each PWM), and just for the first time delay to use a third timer to count up till 5us. want to say: TIM2 - start PWM1 TIM3 - timebase for 5uS (then release TIM3). TIM4 - start PWM2. Will the time delay will be kept between the two signals, or should i consider any skew? Do someone suggest something better?2015-06-28 07:01 PM
Perhaps there's a master/slave timer arrangement, where you can use a higher order channel on one timer as a reset trigger for the other.
2015-06-29 03:37 AM
Do you familiar with similar example code?
2015-06-29 02:10 PM
Not sure I can point to a turn-key example. It strikes me as something doable, but I could spend hours on it, not fun.
You'll need to work through the reference manual for your part, determine which timers pair up, what channels you have spare for triggers, and if your secondary pulse width would get truncated if the timer were reset via a pulse from the primary.You'd also need to think about if this a continuous signal, or if it's something you need to stop/start, or change the frequency or pulse width.