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.

CCS/MSP430F5659: How to clear free running Timer B in between

Part Number: MSP430F5659

Tool/software: Code Composer Studio

Hi,

I am working on MSP430F5659 controller, using 2 timers.

1. Timer A0 for capture the pulse high to low

2. Free running timer B - updating counter on overflow

Timer Init routine has : TBCTL = TBSSEL_2 | MC_1 | TBCLR | TBIE; // SMCLK, contmode, clear TBR // enable interrupt

I want to reset the counter values ( timer B counter value) in between to 0. I don't want to overflow the timer B and overflow interrupt as well.

Please guide me how to do this ?

Nitesh

  • Hi Nitesh,

    TBxR may be cleared by setting the TBCLR bit inside of the TBxCTL register. You can also stop the timer by clearing MC_1 if desired. Don't set TBIE if you would like to ignore overflow conditions, TBIFG can also be cleared manually.

    Regards,
    Ryan

**Attention** This is a public forum