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.

MSP430FR2476: MSP430FR2476

Part Number: MSP430FR2476

Tool/software:

Hello,

I would like to use the TIMER A3.0 as a PWM output. I have defined the following for this purpose:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
void·pwmTempLuefter(real·outpwm)·{
real·vCCR0;
P4DIR·|=·BIT1;
P4SEL0·|=·BIT1;
PM5CTL0·|=LOCKLPM5;
vCCR0·=·65500;
TA3CCR0·=·(uint16)vCCR0;
TA3CCTL1·=·OUTMOD_6;·//·CCR1·reset/set
TA3CCR1·=·(uint16)(vCCR0*outpwm);·//·CCR1·PWM·duty·cycle ...Code
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

The PWM on TIMERB0, for example, works. What is different with TIMER A3.0?

Can anyone help me here?

  • You haven't set OUTMOD in TA3CCTL0, so you won't get a signal on TA3.0. It appears you're actually trying to generate PWM on TA3.1, which is on P4.0 [Ref Data Sheet (SLASEO7C) Table 9-26].

    TAx.0 is not very useful for PWM, since you're limited to 50% duty (OUTMOD=4) at half the frequency. [Ref User Guide (SLAU445I) Sec 13.2.5.1]

    --------------

    Unsolicited:

    > PM5CTL0 |=LOCKLPM5;

    This should be:

    > PM5CTL0 &= ~LOCKLPM5;

**Attention** This is a public forum