Hello,

On the HR Manual following is stated for minumum and maximum value for PWMCHA or PWMCHB or PWMCHC.

Each duty cycle register range is from (–PWMTM/2 – PWMDT) to

(+PWMTM/2 + PWMDT), which, by definition, is scaled such that a

value of 0 represents a 50% PWM duty cycle.

But when I make my own drawing I found it to be PWMCHA_min_max = +/- (PWMTM/2 - PWMDT).

Please see the attached file for signal drawings.

I wonder who makes a mistake?

Hi,

I think you are confusing the calculation because you are looking only at one signal of High-Low pair of a channel at a time.

To understand this let us cosider two extreme cases of 100% and 0% modulation seperately.

In the case of 100% duty cycle, to achieve the 100% modulation PWMCHA should be +PWMTM/2 if dead time DT is programmed as 0. But when DT is not zero the duty is reduced by a fraction of DT/PWMTM by moving the egde of high channel towards zero timing reference in both halves of PWM cycle. This allows for programming additional value of DT in the PWMCHA to make the duty 100% thereby making the maximum possible value as '+PWMTM/2 + PWMDT'. This is apparant in your second figure where low channel is OFF all the time(active low) but high channel is not ON for whole duration.

Similarly in case of 0% duty cycle, to achieve the 0% modulation PWMCHA should be -PWMTM/2 if dead time DT is programmed as 0. But when DT is not zero the duty of 0% is achieved on High side but the duty on Low side in increased by a fraction of DT/PWMTM by moving the egde of low channel away from zero timing reference in both halves of PWM cycle. This allows for programming additional value of -DT in the PWMCHA thereby making the maximum possible value as '-PWMTM/2 - PWMDT'.

Hope it clarifies the doubt.

Regards,

Nabeel