Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

MSP430G2553 Problem to feed external clock from XIN to MCLK

$
0
0

Hello MSP430-Experts !

I'm very happy with my LaunchPad for some time now.

At the moment I try to switch MCLK from DCO-Clock of 8 MHz   to  an external XTAL-Oscillator clock of 2 MHz.

As a cross check I'm using a toggling pin and a scope - - -   five clocks per toggle instruction can be observed.

However, I don't see any change in behavior of the toggling - it stays at  5 x 125 ns  !

My code is:

BCSCTL1 = CALBC1_8MHZ;   // Set DCO to 8 MHz

DCOCTL = CALDCO_8MHZ;

// P2.6 is normally INPUT by default ! now used as XIN only ...

_BIC_SR( OSCOFF );  // reset bit in status register

BCSCTL3 = LFXT1S_3 + XCAP_0; 

IFG1 &= ~OFIFG;   // Clear OSCFault flag

__bis_SR_register(SCG1 + SCG0);   // Stop DCO

BCSCTL2 |= SELM_3 + SELS;

..............................

Is there any statement missing or is the sequence wrong ??

Thank you very much in advance !!

With best regards, Uli

 

 

 

 

 

 

 


Viewing all articles
Browse latest Browse all 262198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>