I started a project where I need both timers for a PWM (high-side and low-side) where a slight delay shall avoid shoot-through in an output stage.
Programming the timer is no problem, but when I try to start them with a certain delay they always (!) become synchronous with their timer-values, i.e. they do not even start independently.
It also seems that they react on the point where I have my breakpoint set before the counter start takes place.
MC-Model: MSP430F5438A, RTC-quartz, DCO=12MHz with XT1 as reference clock, SMCLK=DCOCLK
Config at Initialization:
mov #0x0200,&TA1CTL // SMCLK
mov #0x0000,&TA1CCTL1 // keep on output-mode LOW.
mov #0x0200,&TB0CTL // SMCLK
mov #0x0000,&TB0CCTL1 // keep on output-mode LOW.
Code at start:
mov #0x0060,&TA1CCTL1 // set/reset
mov #0x0060,&TB0CCTL1 // set/reset
bis #0x14,&TB0CTL
// Here a delay of 14 MCLK cycles is introduced
bis #0x14,&TA1CTL
It does not matter how many delays I introduce, startup always occurs synchronous,
Update 2017-Aug-04: Even though the problem was solved a few years ago I'd like to give a hint to other users: Check if your debugger stops timer execution in step-wise debugging. Also, do not set breakpoints directly following the timing-critical commands. I think that additional timing irritations can occure when by the debugger reads data back.