EasyManuals Logo
Home>ST>Microcontrollers>STM8S

ST STM8S Reference Manual

ST STM8S
449 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #116 background imageLoading...
Page #116 background image
Auto-wakeup (AWU) RM0016
116/449 Doc ID 14587 Rev 8
12.3.2 Time base selection
Please refer to the Asynchronous prescaler register (AWU_APR) and Timebase selection
register (AWU_TBR) descriptions.
The AWU time intervals depend on the values of:
AWUTB[3:0] bits. This gives the counter output rank.
APR[5:0] bits. This gives the prescaler division factor (APR
DIV
).
15 non-overlapped ranges of time intervals can be defined as follows:
In order to obtain the right values for AWUTB[3:0] and APR
DIV
, you have to:
First, search the interval range corresponding to the desired time interval. This gives
the AWUTB[3:0] value.
Then APR
DIV
can be chosen to obtain a time interval value as close as possible to the
desired one. This can be done using the formulas listed in the table above.
Note: If the target value is between 2
11
x128/f
LS
and 2
11
x130/f
LS
or between 2
11
x320/f
LS
and
2
11
x330/f
LS
, the value closer to the target one must be chosen.
Table 25. Time base calculation table
Interval range
AWUTB[3:0]
APR
DIV
formula for
time interval
calculation
APR
DIV
range
f
LS
= f f
LS
= 128kHz
2/f - 64/f 0.015625 ms - 0.5 ms 0001 APR
DIV
/f
LS
2 to 64
2x32/f - 2x2x32/f 0.5 ms - 1.0 ms 0010 2 x APR
DIV
/f
LS
32 to 64
2x64/f - 2x2x64/f 1 ms - 2 ms 0011 2
2
x APR
DIV
/f
LS
32 to 64
2
2
x64/f - 2
2
x128/f 2 ms - 4ms 0100 2
3
x APR
DIV
/f
LS
32 to 64
2
3
x64/f - 2
3
x128/f 4 ms - 8 ms 0101 2
4
x APR
DIV
/f
LS
32 to 64
2
4
x64/f - 2
4
x128/f 8 ms - 16 ms 0110 2
5
x APR
DIV
/f
LS
32 to 64
2
5
x64/f - 2
5
x128/f 16 ms - 32 ms 0111 2
6
x APR
DIV
/f
LS
32 to 64
2
6
x64/f - 2
6
x128/f 32 ms - 64 ms 1000 2
7
x APR
DIV
/f
LS
32 to 64
2
7
x64/f - 2
7
x128/f 64 ms - 128 ms 1001 2
8
x APR
DIV
/f
LS
32 to 64
2
8
x64/f - 2
8
x128/f 128 ms - 256 ms 1010 2
9
x APR
DIV
/f
LS
32 to 64
2
9
x64/f - 2
9
x128/f 256 ms - 512 ms 1011 2
10
x APR
DIV
/f
LS
32 to 64
2
10
x64/f - 2
10
x128/f 512 ms - 1.024 s 1100 2
11
x APR
DIV
/f
LS
32 to 64
2
11
x64/f - 2
11
x128/f 1.024 s - 2.048 s 1101 2
12
x APR
DIV
/f
LS
32 to 64
2
11
x130/f - 2
11
x320/f 2.080 s - 5.120 s 1110 5 x 2
11
x APR
DIV
/f
LS
26 to 64
2
11
x330/f - 2
12
x960/f 5.280 s - 30.720s 1111 30 x 2
11
x APR
DIV
/f
LS
11 to 64

Table of Contents

Other manuals for ST STM8S

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the ST STM8S and is the answer not in the manual?

ST STM8S Specifications

General IconGeneral
BrandST
ModelSTM8S
CategoryMicrocontrollers
LanguageEnglish

Related product manuals