
TLC32040 AIC Initialization
4-15
Functional Overview
-
Maximum Timer Period Register Value. The AIC’s minimum master
clock frequency is 75 kHz. Taking into account the ’C31 maximum timer
frequency of 12.5 MHz and the AIC’s minimum master clock frequency,
the ’C31’s timer counter register maximum value should be 165
(12.5 MHz / 75 kHz = 166.7). The ’C31’s timer counts down to 0, therefore,
you need to subtract 1 from this number (166 – 1 = 165). Note that the
TLC32040 specification describes a minimum clock frequency since the
internal signals of the AIC are stored in capacitors that must be periodically
updated.
-
Timer Initialization. The following ’C31 assembly code initializes the tim-
er in clock mode with a timer period of 1. The following code initializes timer
0 to generate a square wave (clock mode) on the TCLK0 pin at a frequency
of 6.25 MHz (timer period = 1):
TGCR0
.set
808020h
; Timer 0 global control register
TCNT0
.set
808024h
; Timer 0 counter register
TPR0
.set
808028h
; Timer 0 period register
TIMVAL
.word
3c1h
; Timer global control register value
ldp
@TGCR0 ; Set Data Page
ldi
0h,R4 ; Initialize R4 to zero
ldi
1h,R0 ; Initialize R0 to 1
sti
R4,@TGCR0 ; Reset timer0
sti
R0,@TPR0 ; Store timer0 period
sti
R4,@TCNT0 ; Reset timer0 counter
ldi
@TIMVAL,R7 ; Load timer control value
sti
R7,@TGCR0 ; Start timer 0
A period of zero is not allowed in pulse mode. If the timer is run in clock mode,
the resulting output is a square wave with a frequency of half that of pulse
mode. A period of zero is allowed in this mode resulting in a 12.5-MHz clock.
Initializing the ’C31 serial port
This subsection explains how to initialize the following:
-
’C31 serial port
-
’C31 serial-port control register (memory-mapped to 0x0080 8040h)
-
FSX/DX/CLKX control register (memory-mapped to 0x0080 8042h)
-
FSR/DR/CLKR control register (memory-mapped to 0x0080 8043h)
For a detailed description of the ’C31 serial port, see the
TMS320C3x User’s
Guide.
Summary of Contents for TMS320C3 Series
Page 1: ...TMS320C3x DSP Starter Kit User s Guide...
Page 18: ...1 4...
Page 28: ...2 10...
Page 82: ...5 18...
Page 140: ...Communications Kernel Source Code A 12...
Page 145: ...Schematics B 5 DSK Circuit Board Dimensions and Schematic Diagrams...
Page 146: ...Schematics B 6...
Page 147: ...Schematics B 7 DSK Circuit Board Dimensions and Schematic Diagrams...
Page 148: ...Schematics B 8...
Page 149: ...Schematics B 9 DSK Circuit Board Dimensions and Schematic Diagrams...
Page 150: ...Schematics B 10...
Page 154: ...B 14...
Page 160: ...C 6...
Page 166: ...Index 6...