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.

MSP430FR2355: Read TimerB counter value (TBxR )

Part Number: MSP430FR2355

For my application, I need to be able to read the TimerB counter value at random times, then schedule a timer compare time event 50uS from "now", where "now" is the present timer counter value.

However, in the UG, I see this note.

I've read this note many times, scratching my head in disbelief since I have never come across a note like this for the timers of any other micros.

Is this note for real ?  Is this behavior typical for MSP430 microcontrollers ?

Do I really need to STOP the timer to be able to get an accurate read ?  What if other critical timing events are on-going with this timer ? I can't just stop the timer so I can get a reading.

Isn't there a capture or sync mechanism associated with the timer circuits so that the micro can get a valid reading on the fly ?  How does an external timer capture event work then ?

There are a lot of questions - I know. But this is un-imaginable to me. Someone could expect that the timer value may be of by a tick, depending on the relative speeds of the micro and the timer, but this is different than "unpredictable". 

Thanks.

  • This really only applies if the timer (source) clock is running asynchronous to the CPU (MCLK). Stated that way, I've seen this type of warning in a number of MCUs.

    SMCLK is typically synchronous to MCLK (same source) but ACLK is typically asynchronous and TBnCLK is always asynchronous.

    An alternative to stopping the timer is reading the counter twice and seeing if you get the same value. Or, as you suggest, you could software-trigger a CAPture though this seems a long-way-around.

**Attention** This is a public forum