cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 5, 3 & 1 MCU

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
Reply
2 Replies
Employee

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
Reply
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
Reply