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.

TMR2CN

 

 

 

 

 

T T T T T T T T

 

 

 

 

 

F F F 2 2 R 2 2

 

 

 

 

 

2 2 2 C S 2 C X

CKCON

 

 

 

 

H L L E P

S C

 

 

 

 

E L S L

T T T T T T S S

 

 

 

N 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

 

 

 

SYSCLK / 12

0

 

 

 

TL2

To SMBus

 

 

 

 

 

 

0

 

 

Overflow

 

 

 

TR2

TCLK

 

 

External Clock / 8

1

 

TMR2L

TMR2H

 

 

 

 

 

 

 

 

SYSCLK

 

1

 

 

 

 

USB Start-of-Frame (SOF)

0

 

 

 

 

 

 

 

Capture

TMR2RLL

TMR2RLH

 

 

 

 

 

Low-Frequency Oscillator

1

 

 

 

Falling Edge

 

 

 

 

 

 

 

 

 

 

T2CSS

Enable

Interrupt

 

 

 

 

 

 

To ADC, SMBus

Figure 21.6. Timer 2 Capture Mode (T2SPLIT = ‘0’)

Rev. 0.5

253

Page 253
Image 253
Silicon Laboratories C8051F344, C8051F347, C8051F346, C8051F341, C8051F343, C8051F340 Timer 2 Capture Mode T2SPLIT = ‘0’