Timer Details: Configuring TIMER_A
Summary of Timer Setup Code – Part 2
Here’s a summary of the timer setup code we have looked at thus far.
Part 1 of our code configures the timer/counter; i.e. the main element of Timer_A.
Part 2 configures the various Capture/Compare registers (CCR). Due to limited space on the slide
we have only included the initCompare function for CCR2. In a real application, you might use all
of the CCR registers – in which case, our initTimerA0() function would become a lot longer.
Before we move onto Part 3 of our timer configuration code, let’s spend a few pages explaining
the 8 different output mode options available when configuring Capture/Compare Registers.
MSP430 Workshop - Timers 6 - 23