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.

TA0 CCR0 output toggling before the timer is started

Other Parts Discussed in Thread: CC430F5137

Hi guys,

I am trying to use TA0 of a cc430f5137 to generate delays. I clock it from SMCLK (which in my case is 12MHz) and all I do in the initialization routine is the following:

{

TA0CTL |= TACLR; /* Set the TACLR */

/* Clear all settings */
TA0CTL = 0x0;

/* Select the clk source to be - SMCLK */
TA0CTL |= TASSEL_2;

}

The compare output for TA0 CCR0 is maped to P3.1. I have the P3SEL set to 0x00 so I could use P3.1 for other things.

However as soon as I set the clock source and before even I start  the  timer in up mode the P3.1 pin starts toggling at about 22kHz. 

In other words, as soon as the above code executes,  P3.1 gets going.

First of all I would have expected that even if the timer were going, since I have chosen to use P3.1 as a general I/O pin, nothing should be coming out on the pin (unless I control it as an I/O ) ,

and also since I haven't yet initialized TA0R and TA0CCR0 and haven't  started the timer yet why is the compare output toggling?

What am I missing?

Thanks.

Cheers:

Jack. 

 

**Attention** This is a public forum