- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Labels:
-
PSoC 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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