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.

CCS/MSP430FR5994: TA4.1 PWM output problem.

Part Number: MSP430FR5994

Tool/software: Code Composer Studio

Good morning,

I'm using the fr5994 to generate pwm through TA4 with TA4.0 output. That doesn't works with both pins according to TA4.0 (P7.4 and P5.6).
Following config. code:

P7DIR |= BIT4;
P7SEL1 |= BIT4;
P7SEL0 &= ~BIT4;

// Configure Timer1_A
TA4CCR0 = pwm_period; // PWM Period
TA4CCR1 = constant; // Tensão constante
TA4CCTL1 = OUTMOD_7; // CCR1 reset/set
TA4CTL = TASSEL__SMCLK | MC__UP | TACLR; // SMCLK, up mode, clear TAR

Checked signal with scope alternating pwm_period from 0~1k DTC (duty cycle) from 0-100% and nothing happen.


When I change to TA4.1 with this config:

P5DIR |= BIT7; // P1.2 output PWM
P5SEL1 |= BIT7; // P1.2 and P1.3 options select
P5SEL0 &= ~BIT7; // Clear P1.2 output latch for a defined power-on state

Same as previously, checked signal with scope with DTC ok. (Both pins of TA4.1 works well)

  • I'm not quite sure what your final paragraph says, but I expect it worked OK on P5.7 or P7.3 (TA4.1).

    P7.4 is TA4.0,which is the output based on TA4CCTL0/CCR0, but you've set OUTMOD in TA4CCTL1. Before you go changing it though, I'll point out that CCR0 is not very useful for "real" PWM since the "set" and "reset" triggers are the same. You can really only use OUTMOD=4 (toggle) with CCR0. (It is actually possible to do PWM using Toggle, but it's usually more trouble than it's worth.)

    I recommend you keep using one of the TA4.1 pins.

  • Thanks for the explanation!!!

    I didn't see that TA4.0 works only with CCR0.

**Attention** This is a public forum