Hi everydoby,
I was a newbies in the PSM programming.
I have a problem with starting of MSP430, when I launch my application (just ‘‘while’’ buckle), the quartz dont start. I work with the debugger mode, the tool is MSP-FET430UIF, the program loading is ok. But the don’t start, in mode ‘‘Run the program in the debugger’’, the MSP apply to the quartz a 22 Hz frequency (3.3V voltage) with dutty cycle at 82%.
If I use ‘‘Step into the current step point’’, the quartz doesn’t have the 3.3V voltage to running.
The OSCFault flag don’t set.
My program :
void initClockModule(){
unsigned int i;
//Basic clock module
BCSCTL1 |= 0x00; // XT2 on, High frequecy mode
do
{
IFG1 &= ~OFIFG; // Clear OSCFault flag
for (i = 0xFF; i > 0; i–); // Time for flag to set
}
while ((IFG1 & OFIFG)); // OSCFault flag still set?
//Configuration des Clocks internes
BCSCTL2 |= SELM_2; // la source du master clock c’est le quartz XT2
BCSCTL2 |= DIVM_0; // pas de prédivision
BCSCTL2 |= SELS ; // la source de SMCLK est le quartz sur XT2
BCSCTL2 |= DIVS_0; // division à regler en vue de la vitesse du timer (par 1)
WDTCTL = WDTPW + WDTHOLD; // Stop WDT
}
Best regards,