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 #115 background imageLoading...
Page #115 background image
RM0016 Auto-wakeup (AWU)
Doc ID 14587 Rev 8 115/449
12.3 AWU functional description
12.3.1 AWU operation
To use the AWU, perform the following steps in order:
1. Measure the LS clock frequency using the MSR bit in AWU_CSR register and TIM3 or
TIM1 input capture 1.
2. Define the appropriate prescaler value by writing to the APR [5:0] bits in the
Asynchronous prescaler register (AWU_APR).
3. Select the desired auto-wakeup delay by writing to the AWUTB[3:0] bits in the
Timebase selection register (AWU_TBR).
4. Set the AWUEN bit in the Control/status register (AWU_CSR).
5. Execute the HALT instruction. AWU counters are reloaded and start to count a new
AWU time interval.
Note: The counters only start when the MCU enters Active-halt mode after a HALT instruction
(refer to the Active-halt mode section in the power management chapter). The AWU
interrupt is then enabled at the same time.
The prescaler counter starts to count only if APR[5:0] value is different from its reset value,
0x3F.
Idle mode
If the AWU is not in use, then the AWUTB[3:0] bits the Timebase selection register
(AWU_TBR) should be loaded with 0b0000 to reduce power consumption.

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