6.8 自唤醒定时器 (WKT)
6.8.1 WKT 结构描述
MS51有一个专用的自唤醒定时器(WKT),用于低功耗模式下的周期唤醒芯片,也可用作通用定时器
。WKT保持计数在空闲或掉电模式。当WKT用作唤醒定时器时,WKT要在进入省电模式之前开启。
WKT能配置两种时钟源片内38.4kHz时钟源LIRC和32.768kHz外部时钟源LXT。注意系统时钟频率必须
大于WKT时钟两倍以上。如果WKT开始计数,在设备进入空闲或掉电模式下,选择的时钟源会也要保
持工作。注意选择的WKT时钟源不会连同WKT的配置自动使能,用户应该手动使能选择的时钟源并等
待它稳定确保操作的成功。
WKT配备了一个简单的8位自动重载向上计数定时器。它的预分频可选择从1/1 到 1/2048,通过
WKPS[2:0] (WKCON[2:0])来设置。用户填重装载值到RWK寄存器来决定它的溢出速率。当计数器发生
溢出RWK可以重载。CWK寄存器可以读出当前的计数值。WKTR (WKCON.3)置位开始计数。当计数器
跨过FFH,WKTF (WKCON.4)置为1,将发生重载 RWK寄存器的值会重载到内部8为计数器。如果
EWKT (EIE1.2) 置为1,WKT中断服务程序将被执行。(这是中文版本的说明)
6.7 Self Wake-Up Timer (WKT)
The MS51 has a dedicated Self Wake-up Timer (WKT), which serves for a periodic wake-up timer in
low power mode or for general purpose timer. WKT remains counting in Idle or Power-down mode.
When WKT is being used as a wake-up timer, a start of WKT can occur just prior to entering a power
management mode. WKT has one clock source, internal 10 kHz. Note that the system clock frequency
must be twice over WKT clock. If WKT starts counting, the selected clock source will remain active
once the device enters Idle or Power-down mode. Note that the selected clock source of WKT will not
automatically enabled along with WKT configuration. User should manually enable the selected clock
source and waiting for stability to ensure a proper operation.
The WKT is implemented simply as a 8-bit auto-reload, up-counting timer with pre-scale 1/1 to 1/2048
selected by WKPS[2:0] (WKCON[2:0]). User fills the reload value into RWK register to determine its
overflow rate. The WKTR (WKCON.3) can be set to start counting. When the counter rolls over FFH,
WKTF (WKCON.4) is set as 1 and a reload is generated and causes the contents of the RWK register
to be reloaded into the internal 8-bit counter. If EWKT (EIE1.2) is set as 1, WKT interrupt service
routine will be served.(这里是英文的说明)英文的说明是只有内部的CLK 10kHZ的,但是中文的说明是38.4kHZ(LIRC)和32.768kHZ(LXT),试了感觉是英文版本的准确是10kHZ。请问论坛里面有使用过MS51的WKT的是不是10kHZ的?
|