This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP-EXP430FR6989: PWM on the EXP6989 board

Part Number: MSP-EXP430FR6989

HEllo,

I'm trying to get a PWM out on P2.2 using Timer B. The timer won't start counting: Am I setting this up right?

void PWMsetup(void)

{
// Configure GPIO
P2DIR |= BIT2; // P2.2 as PWM output
P2SEL0 |= BIT2; //Select secondary module function


// Disable the GPIO power-on default high-impedance mode to activate
// previously configured port settings
PM5CTL0 &= ~LOCKLPM5;

TB0CCR0 = 1000-1; // PWM Period
TB0CCTL0 = OUTMOD_7; // CCR1 reset/set
TB0CCR1 = 500; // CCR1 PWM duty cycle
TB0CTL= TBSSEL__ACLK | MC__UP | TBCLR;  // ACLK, up mode, clear TBR

}

**Attention** This is a public forum