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.

[参考译文] MSP430F67791A:PWM 输出

Guru**** 2487425 points


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

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/1219107/msp430f67791a-pwm-output

器件型号:MSP430F67791A

你好。

我已将以下内容设置为从 TA1.1输出 PWM (引脚11)、但不输出任何内容。
还有需要设置的其他参数吗?

    GPIO_setAsPeripheralModuleFunctionOutputPin(    
        GPIO_PORT_P1,
        GPIO_PIN0
        );

#define MOTOR_TIMER_PERIOD 1400
#define MOTOR_DUTY_CYCLE  700
    //モーター用PWM(TIMER_A1)
    {
    Timer_A_outputPWMParam param_A1 = {0};
    param_A1.clockSource = TIMER_A_CLOCKSOURCE_SMCLK;              //SMCLK(1MHz)
    param_A1.clockSourceDivider = TIMER_A_CLOCKSOURCE_DIVIDER_1;   //
    param_A1.timerPeriod = MOTOR_TIMER_PERIOD;                     //
    param_A1.compareRegister = TIMER_A_CAPTURECOMPARE_REGISTER_1;  //
    param_A1.compareOutputMode = TIMER_A_OUTPUTMODE_RESET_SET;     // 
    param_A1.dutyCycle = MOTOR_DUTY_CYCLE;                         //
    Timer_A_outputPWM(TIMER_A1_BASE, &param_A1);
    }