Silicon Laboratories C8051F344 Two-Way Radio User Manual


 
Rev. 0.5 253
C8051F340/1/2/3/4/5/6/7
21.2.3. Timer 2 Capture Modes: USB Start-of-Frame or LFO Falling Edge
When T2CE = ‘1’, Timer 2 will operate in one of two special capture modes. The capture event can be
selected between a USB Start-of-Frame (SOF) capture, and a Low-Frequency Oscillator (LFO) Falling
Edge capture, using the T2CSS bit. The USB SOF capture mode can be used to calibrate the system clock
or external oscillator against the known USB host SOF clock. The LFO falling-edge capture mode can be
used to calibrate the internal Low-Frequency Oscillator against the internal High-Frequency Oscillator or
an external clock source. When T2SPLIT = ‘0’, Timer
2 counts up and overflows from 0xFFFF to 0x0000.
Each time a capture event is received, the contents of the Timer
2 registers (TMR2H:TMR2L) are latched
into the Timer
2 Reload registers (TMR2RLH:TMR2RLL). A Timer 2 interrupt is generated if enabled.
Figure 21.6. Timer 2 Capture Mode (T2SPLIT = ‘0’)
External Clock / 8
SYSCLK / 12
SYSCLK
TMR2L TMR2H
TMR2RLL TMR2RLH
TCLK
0
1
TR2
0
1
Interrupt
CKCON
T
3
M
H
T
3
M
L
S
C
A
0
S
C
A
1
T
0
M
T
2
M
H
T
2
M
L
T
1
M
Capture
USB Start-of-Frame (SOF)
Enable
TMR2CN
T
F
2
H
T
F
2
L
T
2
X
C
L
K
T
2
C
S
S
T
R
2
T
F
2
L
E
N
T
2
C
E
T
2
S
P
L
I
T
0
1
T2CSS
Low-Frequency Oscillator
Falling Edge
To ADC,
SMBus
To SMBus
TL2
Overflow