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.
TMR2CN
T
T
T
T
F
F
F
2
2
2
2
C
H
L
L
E
E
N
SYSCLK / 12
External Clock / 8
SYSCLK
USB Start-of-Frame (SOF)
Low-Frequency Oscillator
Figure 21.6. Timer 2 Capture Mode (T2SPLIT = '0')
C8051F340/1/2/3/4/5/6/7/8/9/A/B/C/D
T
T
T
T
2
R
2
2
S
2
C
X
CKCON
P
S
C
L
S
L
T
T
T
T
T
T
S
S
I
K
3
3
2
2
1
0
C
C
T
M
M
M
M
M
M
A
A
H
L
H
L
1
0
0
0
TR2
1
1
0
1
Falling Edge
T2CSS
Rev. 1.3
To SMBus
TL2
Overflow
TCLK
TMR2L
TMR2H
Capture
TMR2RLL TMR2RLH
Interrupt
Enable
To ADC,
SMBus
245
Need help?
Do you have a question about the C8051F341 and is the answer not in the manual?
Questions and answers