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.

MSP430F5529: TIMERB0

Part Number: MSP430F5529

Hi Experts,

As I have resolved my previous issue. Thanks for your help and support but I was checking this file MSP430F55xx_tb_02.c. Now one question aries here that in this file CCR0 is loaded with 50000. how the calculations are done here and how do I able to set for 1 hour can anyone make me understand that calculations part so that it will be clear to me because i don't have experience to work with TI MSP430 boards. Please reply to this query. I'm using MSP430F5529 board

Thanks and Regards,

Manish

  • HI all,

    I want to use TIMERB0_VECTOR it should get interrupt on every 8 sec but how the calculations are done I'm not getting that?

  • I think 50000 was chosen as "long enough to produce a visible blink (using SMCLK)". Since there's no code to change SMCLK it's running at about 1MHz. So the interrupt rate is (1000000 ticks/sec) / (50000 ticks/interrupt) = (20 interrupts/sec). Each interrupt is half an LED cycle, so it blinks at 20/2=10Hz, which is quite visible.

    I don't think you'll get 8 seconds from SMCLK, but as I mentioned in your other thread you can get longer periods using ACLK (TBSSEL=1, 32kHz). A 16-bit timer can only count 65536 ticks, and (65536 ticks) / (32768 ticks/sec) = (2  seconds).

    Setting ID=2 [Ref User Guide (SLAU208Q) Table 18-6], you can slow the clock input down by /4, i.e. 32768/4=8192 ticks/sec. Then (65536 ticks) / (8192 ticks/sec) = (8 seconds). If you need more than /8 (ID=3) you can use TB0EX0 to get another /8 [Ref UG Table 18-11]

    Some other combinations are discussed over here:

    https://e2e.ti.com/support/microcontrollers/msp430/f/166/p/829348/3068624

  • Hi

    Thanks the time when I posted question I actually misunderstood it was resolved few hours back thanks for this information it'll be helpful in future.

**Attention** This is a public forum