Other Parts Discussed in Thread: MSP430G2744
Hy, this is my first project with a MSP430G2744 mikrocontroller.
unsigned int i;
/*
*- XT2OFF needed to be enabled
*- XTS needed to be enabled (high frequency mode)
*/
BCSCTL1 = XTS + XT2OFF;
/*
* Set external 3- to 16-MHz clock source
*/
BCSCTL3 = LFXT1S_2 ;
/*
* Wait until oscillator settle
*
* Clear Oscillator Fault Flag
* wait 60us
* Check Oscillator Fault Interrupt Flag
*/
do {
IFG1 &= ~OFIFG;
for (i=0; i < Mcu_wait; i++)
{
/* do nothing */
}
} while(IFG1 & OFIFG != 0);
/*
* Enable Oscillator fault Interrupt
*/
IE1 |= OFIE;
/*
* Select LFXT1CLK as MCLK
* Select LFXT1CLK as SMCLK .
* Set the divider of the SMCLK to 2 because the generated frequency for SMCLK should be 8MHz
*/
BCSCTL2 = SELM_2 + SELS + DIVS_1;
I connected a 16Mhz oscillator to my MSP XIN and XOUT.
The goal of the project is to operate the MCLOCK with 16Mhz and the SMCLOCK with 8Mhz.
I tried to toggle a Pin at my MSP430g2744 to verify the CPU speed but it is to slow only 10Khz..
Can somebody help me to solve this problem?