Hi,

I'm working on a project where I need to precisely sinchcronize PWM0 and PWM1 on BF506F DSP.

To better explain, PWM1 must have a phase displacement equal to exactly 90 degrees respect to PWM0.

Is this goal possible to reach? How?

Thank you very much for your help

Regards

Maurizio

Hi Maurizio,

ok. So, say the PWM switching frequency is 20kHz => T=50usec, and you need variable duty cycle and offset by 12.5usecs. Correct?

As I said below, because the PWM unit produces center-based PWM patterns, you can only toggle an output once in every half period.

Let's assume that PWM0 produces the reference waveform and it is symmetric around the midpoint. PWM1 would then need to shift this waveform by 12.5usec.

That means that PWM1 is asymmetric around the midpoint, and as I stated below it is only possible with double-update mode, ie. you need to calculate two different PWM_CHx values for each half.

Now assume that the dutycyle is >=50%. That means that no matter where the pulse is in the PWM period, at no time there will be two egdes in half a period. So this is possible to achieve, albeit it means a bit of software overhead to compute the two PWM_CHx values.

However, it the duty cycle is <50%, it is possible that the entire pulse lies within a half period. That means that it is impossible to generate with the Unit.

Regards

Klaus