I'm trying to output a PWM signal corresponding to ToF. Testing it with 50% duty cycle right now to verify I can get the signal on the pin I expect.
Within system_pre_int.c I added the code below.
/* Insert your low-level initializations here */
/* Disable Watchdog timer to prevent reset during */
/* int32_t variable initialization sequences. */
// Stop WDT
WDTCTL = WDTPW + WDTHOLD;
P1DIR |= BIT2;
P1SEL0 |= BIT2;
TA0CCR0 = 1000;
TA0CCTL1 = OUTMOD_7;
TA0CCR1 = 500;
TA0CTL = TASSEL_2 + MC_1;
The voltage on the pin which maps to this changed from 0V to 3.3V once I loaded this code on. Wondering what I am doing wrong and not getting a 50% duty cycle.