English
Language : 

ST10F296E Datasheet, PDF (181/346 Pages) STMicroelectronics – High performance 16-bit CPU with DSP functions
ST10F296E
Analog-to-digital converter (ADC)
Clock
The XTCVR register clock is the prescaler output. The prescaler allows the basic register
frequency to be divided, therebyoffering a wide range of counting periods, from 22 to 233
cycles.
Registers
The XTCVR register input is linked to several sources:
● XTSVR register (start value) for reload when the period is finished, or for load when the
timer is starting.
● Incrementer output when the ‘up’ mode is selected
● Decrementer output when the ’down’ mode is selected
● Selection between sources is made through the XTCR control register.
t(s) By setting the TEN bit of the XTCR register to 1 when starting the timer, XTCVR is loaded
c with the XTSVR value on the first rising edge of the counting clock (XB_CLK in Figure 63).
du The XTCVR register output is continuously compared to the XTEVR register to detect the
ro ) end of the counting period. When the registers are equal, several things are done
P t(s depending on the XTCR control register content:
● The output XADCINJ trigger event is generated conditionally depending on the TOE
lete uc control bit.
d ● XTCVR is loaded with XTSVR, or it stops, or it continues to count (see Table 117:
so ro Different counting modes on page 181).
b P XTEVR, XTSVR and all the XTCR bits except TEN must not be modified while the timer is
- O te counting (while XTCR.TEN = 1). The timer can be configured only when it is stopped (TEN =
) le 0). If this rule is not respected, timer behavior is not guaranteed. When programming the
t(s o timer, the XTEVR, XTSVR and XTCR bits (except TEN) can be modified, with TEN = 0. The
s timer is started by modifying the TEN bit. To stop the timer, the TEN bit is modified from 1 to
c b 0. To avoid any problems, it is recommended to modify the XTCR register in two steps: First,
u O by writing the new value without setting the TEN bit and second, by re-writing the new value
rod - with the the TEN bit set.
P t(s) .
Table 117. Different counting modes
lete uc TLE TCS TCVR(n) = TEVR TUD TEN TCVR (n+1)
so rod x
x
x
x
0
TCVR (n)
b P x
0
1
x
O tex
x
0
0
TCVR (n)-1
le 0
1
1
o1
sx
x
0
b1
TCVR (n)+1
O0
1
1
comments
Timer disable
Stop
Decrement
Decrement (continue)
Increment
Increment (continue)
1
1
1
x
TSVR
Load
Note:
Setting the TEN bit to 1 loads the XTCVR register with the TSVR value. If the ‘down’ counter
mode is selected and XTSVR is less then XTEVR, the XTCVR is loaded with the XTSVR
value, but, the timer does not start to count (the current value is hold). The same behavior
occurs in up counter mode (TUD = 1) if TSVR > TEVR.
181/346