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 clock TACLK setting

Part Number: 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);

If you have this setup and want to use TACLK, use
initContParam.clockSource = TIMER_A_CLOCKSOURCE_SMCLK;
Should I change it to initContParam.clockSource =TIMER_A_CLOCKSOURCE_EXTERNAL_TXCLK?
Is it okay to input the clock to pin 6 "TA1CLK"?
Also, the timer interrupt destination is TIMER_A0_BASE for TA0 and TIMER0_A0_VECTOR
Is TA1 correct with TIMER_A1_BASE and TIMER1_A0_VECTOR?
Finally, what is the difference between TIMER1_A0_VECTOR and TIMER1_A1_VECTOR?

  • 1) Yes, this appears to be the correct setting [per timer_a.h]:

    > #define TIMER_A_CLOCKSOURCE_EXTERNAL_TXCLK TASSEL__TACLK

    I don't think you need to change anything else (but try it and see).

    2) TA1CLK is available on P1.6 (pin 6 on the PT/RHA packages [Ref data sheet (SLASEO7C) Table 7-1]). You also need to set the pin to alternate function PSEL=10 [Ref data sheet Table 9-23] with something resembling

    > GPIO_setAsPeripheralModuleFunctionInputPin(GPIO_PORT_P1,GPIO_PIN6, GPIO_SECONDARY_MODULE_FUNCTION);

    3) TIMER1_A0_VECTOR applies only to the CCR0 interrupt. TIMER1_A1_VECTOR applies to all the others. [Ref User Guide (SLAU445I) Sec 13.2.6].

**Attention** This is a public forum