Part Number: MSP430FR2355
Tool/software: Code Composer Studio
In the given program the clock is taken from the external crystal where P2.6 and P2.7 assigned as XIN and XOUT pins of the crystal respectively.So according to me the frequency is decided by the crystal then how TBSSEL_x of the TB0CTL register are controlling the frequency of the the clock.
#include <msp430.h>
int main(void)
{
WDTCTL = WDTPW | WDTHOLD; // Stop WDT
// Configure GPIO
P1DIR |= BIT6 | BIT7; // P1.6 and P1.7 output
P1SEL1 |= BIT6 | BIT7; // P1.6 and P1.7 options select
P2SEL1 |= BIT6 | BIT7; // P2.6~P2.7: crystal pins
do
{
CSCTL7 &= ~(XT1OFFG | DCOFFG); // Clear XT1 and DCO fault flag
SFRIFG1 &= ~OFIFG;
}while (SFRIFG1 & OFIFG); // Test oscillator fault flag
// Disable the GPIO power-on default high-impedance mode to activate
// previously configured port settings
PM5CTL0 &= ~LOCKLPM5;
// Setup Timer0_B
TB0CCR0 = 100-1; // PWM Period
TB0CCTL1 = OUTMOD_7; // CCR1 reset/set
TB0CCR1 = 75; // CCR1 PWM duty cycle
TB0CCTL2 = OUTMOD_7; // CCR2 reset/set
TB0CCR2 = 25; // CCR2 PWM duty cycle
TB0CTL = TBSSEL_1 | MC_1 | TBCLR; // ACLK, up mode, clear TBR
__bis_SR_register(LPM3_bits); // Enter LPM3
__no_operation(); // For debug
}

