Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
84
Добавлен:
01.03.2016
Размер:
3.56 Mб
Скачать

RM0016

Auto-wakeup (AWU)

 

 

12.3AWU functional description

12.3.1AWU 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.

Doc ID 14587 Rev 9

115/454

Соседние файлы в папке Минимум документации STM8