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
}