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.

CCS/MSP430FR5994: Error Setting Multiple Timer Frequencies

Part Number: MSP430FR5994
Other Parts Discussed in Thread: MSP-EXP430FR5994,

Tool/software: Code Composer Studio

I am trying to generate multiple frequencies from timer interrupts (to flash LEDs at different rates, etc.) using Multiple Time Bases similar to the two links below.

www.ti.com/.../slaa513a.pdf
e2e.ti.com/.../1165370

However, when I try to set "TA0CCTL3" and "TA0CCR3" (and 4/5/6, not shown here) I get the following errors.

"../main.c", line 263: error #20: identifier "TA0CCTL3" is undefined
"../main.c", line 264: error #20: identifier "TA0CCR3" is undefined

With the MSP430FR5994 (on the MSP-EXP430FR5994 Development Kit) I should be able to define up to TA0CCR6. Any suggestions why this is not working?

Here is my code to configure the timers. I also use #include <msp430.h> in the code.

    TA0CTL |= TASSEL_1;             // Use ACLK as source
    TA0CTL |= ID_0;                 // Divide clock by 1
    TA0CTL |= MC_2;                 // Use CONTINUOUS mode timer
    TA0CTL |= TACLR;                // Clear timer

    TA0CCTL0 |= CCIE;               // Enable Interrupt on Timer
    TA0CCR0 = 5000;                 // Number of cycles in the timer

    TA0CCTL1 |= CCIE;               // Enable Interrupt on Timer
    TA0CCR1 = 10000;                // Number of cycles in the timer

    TA0CCTL2 |= CCIE;               // Enable Interrupt on Timer
    TA0CCR2 = 15000;                // Number of cycles in the timer

/*
These two lines create errors - TA0CCTL3 and TA0CCR3 are undefined.
See Table 25-8 in slau367o.pdf - should be able to define 7 counters.
*/

    TA0CCTL3 |= CCIE;               // Enable Interrupt on Timer
    TA0CCR3 = 20000;  		    // Number of cycles in the timer

    TA0IV = 0x0000;                 // Clear the interrupt flag

  • The User Guide (SLAU367O) describes what is architected. The Data Sheet (SLASE54B, particularly Tables 3-1 and 6-57) describes what is implemented in a particular device. The latter shows that TA0 has only 3 CCRs.

    TB0 on the FR5994 has 7 CCRs. There are differences between TimerA and TimerB, but they probably don't matter much for your purposes.
  • OK, thanks. So, according to Table 3-1 for the MSP430FR5994 it looks like I can set
    - 3 CCRs each on TA0/1
    - 2 CCRs each on TA2/3/4 (internal only on 2/3) and
    - 7 CCRs on TB0.
    And the registers are defined in Tables 6-57/58/59/60/62/76.

**Attention** This is a public forum