Hi,
I am trying to set up Timer A to use up/down mode and toggle/set. The purpose is the test the device at the chip level, so I have to issue commands via the JTAG port only (MSP430F2410).
I am supplying a clock signal to TACLK. I setup the following configuration:
Write to TACCR0 Control Register(0x172) the value 150 = 0x0096
Write to TACCR1 Control Register(0x174) the value 100 = 0x0064
Write to TACCTL1 Control Register (0x164) CMx=00 No cap, CCISx=00, SCS=0, SCCI=0, CAP=0 Compare, OUTMODx=110 Toggle/Set CCIE=0 Int Disabled, CCI=0, OUT=1, COV=0, CCFIG=0 0000 0000 1100 0100
Write to TACTL Control Register (0x0160) TASSELx=00 TACLK, IDx=00 /1, MCx=11 Updown Mode, TACLR = 1, TAIE interrupt disable 0, TAIFG interrupt flag 0 0000 0000 0011 0100
I have tried the last statement with TACLR = 0 as well.
I expect to get a 33% duty cycle clock since TACCR0 = 150 and TACCR1=100 (100 TACLK cycles low then 100 TACLK cycles high, then 200 TACLK cycles low, then 100 high, then 200 low...)
I expect this clock to be on the TA1 pin. Instead I get a clock that is high for 200 and low for 200 on TA0. TA1 is stuck low.
I can toggle TA0, TA1, and TA2 fine using the static states on the OUT pin.
My question's are:
1. Do I need to setup TACCTL0 for this to work properly? If so, is there anything special that I need to assign such as an interrupt to trigger CCR1? I don't see anything in the documentation and thought maybe the compilers could be handling a default setup of the TACCTLx registers in the background.
2. If I toggle the TACLR pin, does it only reset the counters, or does it reset or latch in the set up data as well?
3. Is there a state diagram anywhere of the steps to setup the TimerA compare mode for PWM signals? The CCS5 examples make it look pretty simple, but from my experiences with the ADC12, the setup may have to take place step by step instead of all at once as it appears in the examples.
Thanks,
Tom