Other Parts Discussed in Thread: MSP430F5529
Hello ,
I am using MSP430F5529 in that i had set clk at 16mhz . but my question whenever in change TA0CCR0 value but its time remains unchanged . so can anybody can help me. how to change vary time
here is my code
//================================Clock initialization==================================//
UCSCTL3 |= SELREF_2; // Set DCO FLL reference = REFO
UCSCTL4 |= SELA_2 + SELS_4; // Set ACLK = REFO
__bis_SR_register(SCG0); // Disable the FLL control loop
UCSCTL0 = 0x0000; // Set lowest possible DCOx, MODx
UCSCTL1 = DCORSEL_5; // Select DCO range 24MHz operation
UCSCTL2 = FLLD_1 + 488; // Set DCO Multiplier for 16MHz
// (N + 1) * FLLRef = Fdco
// (488 + 1) * 32768 = 16MHz
// Set FLL Div = fDCOCLK/2
__bic_SR_register(SCG0); // Enable the FLL control loop
/* Worst-case settling time for the DCO when the DCO range bits have been
changed is n x 32 x 32 x f_MCLK / f_FLL_reference. See UCS chapter in 5xx
UG for optimization.
32 x 32 x 12 MHz / 32,768 Hz = 375000 = MCLK cycles for DCO to settle
*
*/
__delay_cycles(375000);
// Loop until XT1,XT2 & DCO fault flag is cleared
do
{
UCSCTL7 &= ~(XT2OFFG + XT1LFOFFG + DCOFFG);
// Clear XT2,XT1,DCO fault flags
SFRIFG1 &= ~OFIFG; // Clear fault flags
}while (SFRIFG1&OFIFG); // Test oscillator fault flag
TA0CCTL0 = CCIE; // CCR0 interrupt enabled
TA0CCR0 = 100; // Display timer - for 32mS - 32K@8MHz, 4K@1MHz - currently SMCLK used
TA0CTL = TASSEL_2 + MC_2 + TACLR;// + ID__8 ; // SMCLK, contmode, clear TAR
Please help me out
Thank you