General-Purpose Timers
Asymmetric and Symmetric PWM via General Purpose
Timer Compares
PWM switching frequency:
The PWM carrier frequency is determined by the value contained in the period register TxPR,
and the frequency of the clocking signal. The value needed in the period register is:
Asymmetric PWM:
1
period
timer
period
switching
register
period
−
=
Symmetric PWM:
period)
2(timer
period
switching
register
period
=
Notice that in the symmetric case, the period value is half that of the asymmetric case. This is
because for up/down counting, the actual timer period is twice that specified in the period register
(i.e. the timer counts up to the period register value, and then counts back down).
PWM resolution:
The PWM compare function resolution can be computed once the period register value is
determined. The largest power of 2 is determined that is less than (or close to) the period value.
As an example, if asymmetric was 1000, and symmetric was 500, then:
Asymmetric PWM: approx. 10 bit resolution since 2
10
= 1024
≈
1000
Symmetric PWM: approx. 9 bit resolution since 2
9
= 512
≈
500
PWM duty cycle:
Duty cycle calculations are simple provided one remembers that the PWM signal is initially
inactive during any particular timer period, and becomes active after the (first) compare match
occurs. The timer compare register should be loaded with the value as follows:
Asymmetric PWM:
TxCMPR
TxPR
cycle)
duty
-
(100%
=
∗
Symmetric PWM:
TxPR
cycle)
duty
-
(100%
=
TxCMPR
∗
Note that for symmetric PWM, the desired duty cycle is only achieved if the compare register
TxCMPR contains the computed value for both the up-count compare and down-count compare
portions of the timer period.
7 - 16
C28x - Event Manager
Содержание C28 Series
Страница 64: ...Summary 3 16 C28x Peripheral Registers Header Files ...
Страница 78: ...Interrupt Sources 4 14 C28x Reset and Interrupts ...
Страница 218: ...Lab 9 DSP BIOS 9 22 C28x Using DSP BIOS ...
Страница 244: ...Lab 10 Programming the Flash 10 26 C28x System Design ...
Страница 273: ...Appendix A eZdsp F2812 C28x Appendix A eZdsp F2812 A 1 ...
Страница 275: ...Appendix eZdsp F2812 eZdsp F2812 Connector Header and Pin Diagram C28x Appendix A eZdsp F2812 A 3 ...
Страница 276: ...Appendix P2 Expansion Interface A 4 C28x Appendix A eZdsp F2812 ...
Страница 277: ...Appendix P4 P8 P7 I O Interface C28x Appendix A eZdsp F2812 A 5 ...
Страница 278: ...Appendix A 6 C28x Appendix A eZdsp F2812 ...
Страница 279: ...Appendix P5 P9 Analog Interface C28x Appendix A eZdsp F2812 A 7 ...
Страница 281: ...Appendix JP7 JP8 JP11 JP12 Boot Mode Select JP9 PLL Disable DS1 DS2 LEDs C28x Appendix A eZdsp F2812 A 9 ...
Страница 282: ...Appendix A 10 C28x Appendix A eZdsp F2812 TP1 TP2 Test Points ...