Hello,
I was trying to setup 2 different PWM channels on my launchpad and noticed some strange behavior with timer1 using ACLK, and so I ran the following test, checking output of TA0CCR0 and TA1CCR0 on P1.1(TA0.0) and P2.0(TA1.0) with my oscilloscope. The only variables are P1SEL/P2SEL and TASSEL. Here's what I noticed:
- Timer0 and timer1 both function properly with SMCLK, with different internal divider (and different CCR1s work as expected)
- Timer1 cannot use ACLK at all. (output = low)
- Timer0 with ACLK works properly alone.
- Timer0 with ACLK doesn't work if port2 are selected for timer1 outputs. If timer1 uses SMCLK, timer1 works, but not timer0. If timer1 uses ACLK, both timer output = low.
The outputs that confuse me are marked in RED in the table attached. Can someone please explain to me why timer1 with ACLK behaves that way? Am I overlooking anything in the datasheet?
Thanks in advance.
#include <msp430g2553.h>
void clockConfig()
{
BCSCTL1 = CALBC1_1MHZ; // Set DCO
DCOCTL = CALDCO_1MHZ;
}
void main(void)
{
WDTCTL = WDTPW + WDTHOLD; // Stop WDT
clockConfig();
P1OUT = BIT1;
P1DIR = BIT1;
P1SEL = BIT1;
TACCR0 = 10;
TACCTL0 = OUTMOD_4;
TACTL = TASSEL_x | MC_1;
P2OUT = BIT0 ;
P2DIR = BIT0 ;
P2SEL = BIT0;
TA1CCR0 = 10;
TA1CCTL0 = OUTMOD_4;
TA1CTL = TASSEL_x | MC_1;
}
Hardware:
EXP430G2 Rev 1.5 (MSP430G2553)
Kit crystal installed with 12.5pf caps in C21/C22
oscilloscope
Software:
compiled with CCS 6.1.3
programmed with mspdebug