Figure 21.6. timer 2 capture mode (t2split = ‘0’) – Silicon Laboratories C8051F347 User Manual

Page 245

Advertising
background image

Rev. 1.3

245

C8051F340/1/2/3/4/5/6/7/8/9/A/B/C/D

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

Advertising
This manual is related to the following products: