MC68HC908RF2MFA Freescale Semiconductor, MC68HC908RF2MFA Datasheet - Page 77

no-image

MC68HC908RF2MFA

Manufacturer Part Number
MC68HC908RF2MFA
Description
IC MCU 2K FLASH 4MHZ 32-LQFP
Manufacturer
Freescale Semiconductor
Series
HC08r
Datasheet

Specifications of MC68HC908RF2MFA

Core Processor
HC08
Core Size
8-Bit
Speed
4MHz
Peripherals
LVD, POR, PWM, RF Mod
Number Of I /o
12
Program Memory Size
2KB (2K x 8)
Program Memory Type
FLASH
Ram Size
128 x 8
Voltage - Supply (vcc/vdd)
1.8 V ~ 3.6 V
Oscillator Type
Internal
Operating Temperature
-40°C ~ 125°C
Package / Case
32-LQFP
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
Eeprom Size
-
Data Converters
-
Connectivity
-

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
MC68HC908RF2MFA
Manufacturer:
Freescale Semiconductor
Quantity:
10 000
6.4.2 Enabling the Clock Monitor
MC68HC908RF2 — Rev. 4.0
MOTOROLA
start
loop
start
loop
lda
**
sta
cmpa
bne
lda
**
sta
brset
cmpa
bne
#$13
**
icgcr
icgcr
loop
#$AF
**
icgcr
6,ICGCR,error ;Verify CMF is not set
icgcr
loop
Figure 6-8. Code Example for 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:
These events must happen in sequence. A short assembly code example of how
to employ this flow is shown in
and does not represent valid syntax for any particular assembler.
Figure 6-7. Code Example for Switching Clock Sources
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
Freescale Semiconductor, Inc.
;Clock Switching Code Example
;This code switches from Internal to External clock
;Clock Monitor and interrupts are not enabled
;Mask for CS, ECGON, ECGS
;If switching from External to Internal, mask is $0C.
;Other code here, such as writing the COP, since ECGS may
;take some time to set
;Try to set CS, ECGON and clear ICGON. ICGON will not
;clear until CS is set, and CS will not set until
;ECGON and ECGS are set.
;Check to see if ECGS set, then CS set, then ICGON clear
;Keep looping until ICGON is clear.
For More Information On This Product,
Internal Clock Generator Module (ICG)
;Mask for CMIE, CMON, ICGON, ICGS, ECGON, ECGS
;Other code here, such as writing the COP, since ECGS
;Try to set CMIE. CMIE wont set until CMON set; CMON
;Check if ECGS set, then CMON set, then CMIE set
;Keep looping until CMIE is set.
;Clock Monitor Enabling Code Example
;This code turns on both clocks, selects the desired
; one, then turns on the Clock Monitor and Interrupts
; If Internal Clock desired, mask is $AF
; If External Clock desired, mask is $BF
; If interrupts not desired mask is $2F int; $3F ext
; and ICGS may take some time to set.
; won’t set until ICGON, ICGS, ECGON, ECGS set.
Go to: www.freescale.com
Figure
6-8. This code is for illustrative purposes only
Internal Clock Generator Module (ICG)
Usage Notes
Data Sheet
77

Related parts for MC68HC908RF2MFA