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.

[参考译文] LP-MSP430FR2476:Timer_External 时钟 TACLK 设置

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

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/1348450/lp-msp430fr2476-timer_external-clock-taclk-setting

器件型号:LP-MSP430FR2476

    Timer_A_initContinuousModeParam initContParam = {0};
    initContParam.clockSource = TIMER_A_CLOCKSOURCE_SMCLK;
    initContParam.clockSourceDivider = TIMER_A_CLOCKSOURCE_DIVIDER_1;
    initContParam.timerInterruptEnable_TAIE = TIMER_A_TAIE_INTERRUPT_DISABLE;
    initContParam.timerClear = TIMER_A_DO_CLEAR;
    initContParam.startTimer = false;
    Timer_A_initContinuousMode(TIMER_A1_BASE, &initContParam);

如果您已经进行了此设置并想要使用 TACLK、请使用
initContParam.clockSource = TIMER_A_CLOCKSOURCE_SMCLK;
我是否应该将其更改为 initContParam.clockSource =TIMER_A_CLOCKSOURCE_EXTERNAL_TXCLK?
将时钟输入到引脚6" TA1CLK"是否可以?
此外、对于 TA0和 TIMER0_A0_VECTOR、计时器中断目标是 TIMER_A0_BASE
对于 TIMER_A1_BASE 和 TIMER1_A0_VECTOR、TA1是否正确?
最后、Timer1_A0_vector 和 Timer1_A1_vector 之间的区别是什么?

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

    1) 1)是的、这似乎是正确的设置[PER TIMER_a.h]:

    > #define TIMER_A_CLOCKSOURCE_EXTERNAL_TXCLK TASSEL__TACLK

    我认为你不需要改变任何其他东西(但尝试它,看看)。

    2) 2) PT 上提供了 TA1CLK (TA1CLK/RHA 封装上的引脚6 [请参考数据表(SLASEO7C)表7-1 ])。 您还需要将引脚设置为备用功能 PSEL=10 [请参阅数据表中的表9-23]、

    > GPIO_setAPeripheralModuleFunctionInputPin (GPIO_PORT_P1、GPIO_PIN6、GPIO_secondary_module_function);

    3) 3) Timer1_A0_vector 仅适用于 CCR0中断。 Timer1_A1_Vector 适用于所有其他变量。 [请参阅用户指南(SLAU445I)第13.2.6节]。