Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

I have found the PWM user modules estimate the output period adding an Offset equal
to 1 clk cycle of your external clock.
Therefore the formula remains finally:

Tout= nºPERIOD*Tclk+1cycle_clk;

(Where nºPERIOD is the counter PERIOD, the number of clk input risng edges to calculate
the PWM output square wave period).

I have supposed it's due to a kind of precharge or setup time te PWM UM needs to charge again the values
in the counter or make the interrupts once the countdown is over.

I haven't find any statement about this in the PWM datasheet.

Anyone could confirm that theory or I'm wrong?

Thanks for all.

0 Likes
2 Replies
KishoreS_96
Employee
Employee
5 sign-ins 50 replies posted 25 replies posted

Hi,

   

 

   

Yes you are right. The actual period value is the value whatever you are entering in Period register + 1. It is also mentioned in the PWM UM datasheet.

   

 

   

Regards,

   

Kishore.

0 Likes
Anonymous
Not applicable

Hi,

   

 

   

The extra clock is to count down the PWM counter value from 1 to 0 when counting down.

   

The configuration tab shows the "Period" value which takes into account this extra clock. You can set the Period value depending upon this value displayed.

   

 

   

Regards,

   

dasg

0 Likes