General-Purpose Timers
GP Timer Modes of Operation
The C28x event managers (EVA and EVB) each have two General Purpose Timers (GP Timers).
Each timer has four different modes of operation. The most simple is the Stop/Hold mode, where
the operation of the timer stops and holds at its current state. The timer counter, its compare
output, and its prescale counter all remain unchanged in this mode. Two of the remaining three
modes are commonly used in PWM generation, the exception being the directional up/down
counting mode. This mode allows the use of external signals for both count clocking and
direction, and is also employed for recording encoder counts from the on-chip QEP units.
Continuous-Up Counting
Continuous
Continuous
-
-
Up Counting Mode
Up Counting Mode
This example:
This example:
TxCON.3
TxCON.3
-
-
2 = 00 (reload
2 = 00 (reload
TxCMPR
TxCMPR
on underflow)
on underflow)
TxPR
TxPR
= 3
= 3
TxCMPR
TxCMPR
= 1 (initially)
= 1 (initially)
Prescale
Prescale
= 1
= 1
0
0
1
1
2
2
3
3
0
0
1
1
2
2
3
3
0
0
1
1
2
2
CPUCLK
CPUCLK
TxCNT
TxCNT
Reg.
Reg.
3
3
0
0
CPU writes a 2 to
CPU writes a 2 to
compare reg. buffer
compare reg. buffer
anytime here
anytime here
TxCMPR
TxCMPR
=2 is loaded here
=2 is loaded here
TxPWM
TxPWM
/
/
TxCMP
TxCMP
(active high)
(active high)
(Used for Asymmetric PWM Waveforms)
(Used for Asymmetric PWM Waveforms)
♦
♦
Seemless
Seemless
counting continues
counting continues
♦
♦
Up count period is TxPR+1
Up count period is TxPR+1
The procedure for GP Timer Continuous-Up Counting is as follows:
User sets bit 6 of TxCON register high to initiate counting
Counting begins on next rising clock edge
−
1
st
count is a “Zero” (no increment)
Count up until match with period register
If counter > period counts up to FFFFh
On next rising clock edge:
−
Counter resets to zero
−
Counting continues seemlessly
7 - 10
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 ...