Tool/software: Code Composer Studio
int main(void) {
WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer
P1DIR |= 0x00; //Set pin 1.0 to the output direction.
P1SEL0 |= 0x00; //Select pin 1.0 as our PWM output.
TA0CCR0 = 1000-1; //Set the period in the Timer A0 Capture/Compare 0 register to 1000 us.
TA0CCTL1 = OUTMOD_7;
TA0CCR1 = 800; //The period in microseconds that the power is ON. It's half the time, which translates to a 50% duty cycle.
TA0CTL = TASSEL_2 + MC_1; //TASSEL_2 selects SMCLK as the clock source, and MC_1 tells it to count up to the value in TA0CCR0.
__bis_SR_register(LPM0_bits); //Switch to low power mode 0.
}
The LED 1.0 doesn't work in PWM-mode. Also if I change the code to:
int main(void) {
WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer
P1DIR |= 0x04; //Set pin 1.2 to the output direction.
P1SEL0 |= 0x04; //Select pin 1.2 as our PWM output.
TA0CCR0 = 1000-1; //Set the period in the Timer A0 Capture/Compare 0 register to 1000 us.
TA0CCTL1 = OUTMOD_7;
TA0CCR1 = 800; //The period in microseconds that the power is ON. It's half the time, which translates to a 50% duty cycle.
TA0CTL = TASSEL_2 + MC_1; //TASSEL_2 selects SMCLK as the clock source, and MC_1 tells it to count up to the value in TA0CCR0.
__bis_SR_register(LPM0_bits); //Switch to low power mode 0.
}
...there is no function of the connected LED.
Does the MSPFR4133 supports the PWM-mode to this qutputs?