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.

MSP430F2132 timer names

Other Parts Discussed in Thread: MSP430F2132

Some questions on the MSP430F2132

1) I have been told that on the MSP430F2132 that there are two timers called Timer0 and Timer1 not TimerA and TimerB. Is this correct?

2) Where can I find reference material that explains that Timer1 exists in this device?

3) Is there a document that details out the timer information for all of the MSP430F2xxx devices and the naming convention?

  • MSP430 has two variants of timers. One called TimerA and the other called TimerB. This is described in the family user's guides. MSP430F2132 has two timer modules. They are both of the TimerA variant, thus they are called Timer0 and Timer1. This is described in the data-sheet.

  • 1) Actually, it should read TimerA0 and TimerA1, as the 2132 has two TimerA modules, but no TimerB or TimerD module. There are MSPs with three TimerA mdoules and a TimerB module.

    2) first page of the device datasheet.

    3) no, there is no document. Actually, the namin convention is a bit confusing.
    Originally, when there was only oen TimerA and one TiemrB (if at all), the interrupt vectors for them were called TIMER_x0_VECTOR and TIMER_x1_VECTOR ( (x = A/B, as each timer has two vectors).
    Then came devices with more than one TimerA. How to call the vectors now? The 'solution' was TIMER0_Ax_VECTOR for the first adn TIMER1_Ax_VECTOR for the second timers two vectors.
    This is why in some datasheets the timers are named Timer0_Ax and Timer1_Ax. However, the 'x' here refers to the number of CCR units this timer has. A third number, adding to the confusion.

    I must admit, I didn't find a better solution, except for adding the 0/1 for the two vectors behind the _VECTOR in the vector name, But then these names were different from the names for all other vectors.

    And it's not only MSP430F2xxx devices. The timer naming confusion is carried from 1X to 6x family. And now. all compilers and projects use this weird naming, so it is too late to come up with something better.

  • Very confusing, so I created the following:

    //Timers come in 3 different hardware variants, TimerA, TimerB, and TimerD
    //MSPs can have several timers, which are called Timer0, Timer1, etc.
    //Timer names typically take the form of: "TimerX_YZ"
    //where:
    //X = 0, 1, 2 etc used to help create a unique timer name
    //Y = A, B, or D to indicate either an A, B, or D variant timer
    //Z = 3, 5, or 7 to indicate the number of Capture/Compare registers in the timer

    Enjoy!

  • MikeH said:
    I created the following

    Looks good.

    However, Z can be 2 too (most G2xx series devices).
    And of course X can be 0 multiple times, if Y differs (Timer0_A3 + Timer0_B7)

    And I'd say "// X = 0,1,2 etc used to enumerate multiple timers of same variant Y"

    But this is only for the datasheet naming. For interrupt vectors, Z is dropped and replaced by 0 for the CCR0 interrupt and 1 for all other interrupts of this timer.

    For register names, the naming is TYX... And in case of a TimerA0, X may be omitted, as well as TYX can be omitted completely for its CCR registers.

    I fear it won't get better if you try to put it into formula.

    I fear the best representaiton is a 4-dimensional table :(

  • MikeH said:
    Timers come in 3 different hardware variants, TimerA, TimerB, and TimerD

    So what happened to TimerC ?!

  • Andy Neil said:
    So what happened to TimerC

    And to MSP430F3xx family? :)
    Are sou sure, that 'D' is an enumeration? Could as well mean 'doublesized" or something like that.

  • Jens-Michael Gross said:
    Could as well mean 'doublesized" or something like that.

    In which case, what's the significance of 'A' and 'B'...?

     

  • Andy Neil said:
    In which case, what's the significance of 'A' and 'B'...?

    Nobody ever promised that the individual namings follow a common pattern. Top priority is that they are different. :)

**Attention** This is a public forum