Texas Instruments MSP430x1xx User Manual page 124

Texas instruments modules and peripherals user's guide
Table of Contents

Advertisement

Basic Clock Module Operation
Sourcing MCLK from a Crystal
After a PUC, the basic clock module uses DCOCLK for MCLK. If required,
MCLK may be sourced from LFXT1 or XT2.
The sequence to switch the MCLK source from the DCO clock to the crystal
clock (LFXT1CLK or XT2CLK) is:
1) Switch on the crystal oscillator
2) Clear the OFIFG flag
3) Wait at least 50 µs
4) Test OFIFG, and repeat steps 1-4 until OFIFG remains cleared.
; Select LFXT1 (HF mode) for MCLK
L1 BIC.B #OFIFG,&IFG1
L2 DEC
4-12
Basic Clock Module
BIC
#OSCOFF,SR
BIS.B #XTS,BCSCTL1
MOV
#0FFh,R15
R15
JNZ
L2
BIT.B #OFIFG,&IFG1
JNZ
L1
BIS.B #SELM1+SELM0,&BCSCTL2 ; Select LFXT1CLK
; Turn on osc.
; HF mode
; Clear OFIFG
; Delay
;
;
; Re−test OFIFG
; Repeat test if needed

Advertisement

Table of Contents
loading

Table of Contents