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

Guru**** 2381880 points
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/1480925/msp430fr2476-msp430fr2476

器件型号:MSP430FR2476

工具与软件:

您好!

我想使用计时器 A3.0作为 PWM 输出。 为此、我定义了以下内容:

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

例如、TIMERB0上的 PWM 正常工作。 计时器 A3.0有何不同?

有人能在这里帮助我吗?

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您尚未在 TA3CCTL0中设置 OUTMOD、因此您不会在 TA3.0上获得信号。 您似乎实际上正在尝试在 TA3.1上生成 PWM、该页在 P4.0 [参考数据表(SLASEO7C)表9-26]中。

    TAx.0对于 PWM 不是很有用、因为您仅能在一半的频率下实现50%的占空比(OUTMOD=4)。 [参考用户指南(SLAU445I)第 13.2.5.1节]

    ---

    未经请求:

    > PM5CTL0 |=LOCKLPM5 ;

    这应该是:

    > PM5CTL0 &=~μ s LOCKLPM5;