欢迎访问ic37.com |
会员登录 免费注册
发布采购

68HC908RFRK2 参数 Datasheet PDF下载

68HC908RFRK2图片预览
型号: 68HC908RFRK2
PDF下载: 下载PDF文件 查看货源
内容描述: 超前信息 [Advance Information]
分类和应用:
文件页数/大小: 250 页 / 2075 K
品牌: FREESCALE [ Freescale ]
 浏览型号68HC908RFRK2的Datasheet PDF文件第120页浏览型号68HC908RFRK2的Datasheet PDF文件第121页浏览型号68HC908RFRK2的Datasheet PDF文件第122页浏览型号68HC908RFRK2的Datasheet PDF文件第123页浏览型号68HC908RFRK2的Datasheet PDF文件第125页浏览型号68HC908RFRK2的Datasheet PDF文件第126页浏览型号68HC908RFRK2的Datasheet PDF文件第127页浏览型号68HC908RFRK2的Datasheet PDF文件第128页  
Freescale Semiconductor, Inc.  
Internal Clock Generator Module (ICG)  
8.5.2 Enabling the Clock Monitor  
Many applications require the clock monitor to determine if one of the  
clock sources has become inactive, so the other can be used to recover  
from a potentially dangerous situation. Using the clock monitor requires  
both clocks to be active (ECGON and ICGON both set). To enable the  
clock monitor, both clocks also must be stable (ECGS and ICGS both  
set). This is to prevent the use of the clock monitor when a clock is first  
turned on and potentially unstable.  
Enabling the clock monitor and clock monitor interrupts requires a flow  
similar to this flow:  
1. Enable the alternate clock source  
2. Wait for both clock sources to be stable  
3. Switch to the desired clock source if necessary  
4. Enable the clock monitor  
5. Enable clock monitor interrupts  
These events must happen in sequence. A short assembly code  
example of how to employ this flow is shown in Figure 8-8. This code is  
for illustrative purposes only and does not represent valid syntax for any  
particular assembler.  
;Clock Monitor Enabling Code Example  
;This code turns on both clocks, selects the desired  
; one, then turns on the Clock Monitor and Interrupts  
;Mask for CMIE, CMON, ICGON, ICGS, ECGON, ECGS  
; If Internal Clock desired, mask is $AF  
start lda  
#$AF  
; If External Clock desired, mask is $BF  
; If interrupts not desired mask is $2F int; $3F ext  
;Other code here, such as writing the COP, since ECGS  
; and ICGS may take some time to set.  
loop  
**  
**  
sta  
icgcr  
;Try to set CMIE. CMIE wont set until CMON set; CMON  
; won’t set until ICGON, ICGS, ECGON, ECGS set.  
brset 6,ICGCR,error ;Verify CMF is not set  
cmpa  
bne  
icgcr  
loop  
;Check if ECGS set, then CMON set, then CMIE set  
;Keep looping until CMIE is set.  
Figure 8-8. Code Example for Enabling the Clock Monitor  
Advance Information  
124  
MC68HC908RFRK2  
MOTOROLA  
Internal Clock Generator Module (ICG)  
For More Information On This Product,  
Go to: www.freescale.com  
 
 
 复制成功!