Other Parts Discussed in Thread: MSP430F2618
MSP430F2618. Two 16 MHZ crystal connected to XT and XT2. Capacitors 22pf to GND connected to each XT's pin. Vcc=3.2V. I've changed BCSCTL2 and other registers. If I haven't SMCLK only, programm is stopped ( BCSCTL2 |= 0xC8 ). ACLK and SMCLK are 16 MHz, but MCLK is 1.081 MHz always. All frequencies measured on pins. How can I config registors to have MCLK from external 16MHz crystal?
WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer
__bic_SR_register(OSCOFF); // Turn On Oscillator
BCSCTL1 = 0xC7;
BCSCTL3 = 0xA4;
IFG1 &= ~(OFIFG); // Clear OFIFG
do
for (a=255;a>1;a--) __no_operation();
while ( (IFG1&OFIFG) != OFIFG ); // Re-test OFIFG
BCSCTL2 |= 0x88;
P5SEL |= 0x70; // Clocks to P5
P5DIR |= 0x70;