Part Number: MSP430FR2311
hi every one,
i am trying to run pwm source code in below. But, i cannot see pwm signal to P1.6 port. what is the wrong things?
thankyou for your help,
best regards,
void main(void)
{
WDTCTL = WDTPW | WDTHOLD; // Stop WDT
P1DIR |= BIT7; // P1.1 and P1.7 output
P1SEL0 |= BIT7; // P1.7 options select - TB0.2 output
P1SEL1 &= ~(BIT7); // TB0TRG Trigger
// Disable the GPIO power-on default high-impedance mode to activate
// previously configured port settings
PM5CTL0 &= ~LOCKLPM5;
SYSCFG2 |= TB0TRGSEL__EXTERNAL; //Change TB0 high-impedance trigger to external (P1.2)
// Configure T0.2
TB0CCR0 = 1000-1; // PWM Period
TB0CCTL2 = OUTMOD_7; // CCR2 reset/set
TB0CCR2 = 250; // CCR2 PWM duty cycle
TB0CTL = TBSSEL__SMCLK | MC__UP | TBCLR; // SMCLK, up mode, clear TBR
__enable_interrupt(); //Enable maskable interrupts
__bis_SR_register( GIE);
// __bis_SR_register(LPM0_bits); // Enter LPM0
__no_operation(); // For debugger
do{}while(1);
}