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