SLAA513B December   2011  – February 2022 MSP430G2112 , MSP430G2112 , MSP430G2152 , MSP430G2152 , MSP430G2212 , MSP430G2212 , MSP430G2252 , MSP430G2252 , MSP430G2312 , MSP430G2312 , MSP430G2352 , MSP430G2352 , MSP430G2412 , MSP430G2412 , MSP430G2452 , MSP430G2452

 

  1.   Trademarks
  2. 1Typical Single Time Base Method
  3. 2Multiple Time Base Method
  4. 3Implementing the Multiple Time Base Method in a Custom Application
    1. 3.1 Timer Clock Source Selection
    2. 3.2 Period and Frequency Calculation
    3. 3.3 Duty Cycle Calculation
  5. 4Example Code
    1. 4.1 Method
      1. 4.1.1 ISR for Multiple Frequencies
      2. 4.1.2 ISR for Multiple Frequencies and Duty Cycles (PWM)
    2. 4.2 Included Code Examples
  6. 5Limitations of the Multiple Time Base Method
    1. 5.1 ISR Overhead
    2. 5.2 Maximum Output Frequency vs Number of Signals
    3. 5.3 Power Consumption
  7. 6References
  8. 7Revision History

Maximum Output Frequency vs Number of Signals

The number of output signals being produced has a significant effect on the maximum frequencies that can be reliably produced using continuous mode. This is due to the increase in ISR time when an additional signal must be handled. Figure 5-3 and Figure 5-4 show the relationships between period count and the maximum output frequency produced versus the number of timer signals implemented on the Timer_B module of an MSP430F5529 and from the Timer_A module of an MSP430G2452 sourced from a 1-MHz MCLK. The data is quite similar for both timer modules, so the same values can be used as general guidelines for most MSP430 devices. As shown in Figure 5-1, the Minimum Period Count is independent of MCLK frequency, so the same data can be used as a guideline for any MCLK frequency.

GUID-A7E20F50-F576-4F3B-9B5E-B41BAA22A12E-low.gif
The data in Figure 5-3 was generated from testing on an MSP430G2452 and an MSP430F5529 producing signals of the same period.
The data points in Figure 5-3 and Figure 5-4 can also be found in Table 5-2.
This data is provided only as a general guideline for the required timer source frequency to produce the desired output frequencies, and should not be regarded as a data sheet specification. Other factors like the other interrupts in the system, the construction of the ISR code, or different frequency and duty cycle combinations may affect the results in a particular application.
Figure 5-3 Minimum Period Count vs Number of Timer Signals
GUID-C069B39E-E609-40D7-B29F-AAA6F6F3ABAC-low.gif
The data in Figure 5-4was generated from testing on an MSP430G2452 and an MSP430F5529 producing signals of the same period.
The data points in Figure 5-3 and Figure 5-4 can also be found in Table 5-2.
This data is provided only as a general guideline for the required timer source frequency to produce the desired output frequencies, and should not be regarded as a data sheet specification. Other factors like the other interrupts in the system, the construction of the ISR code, or different frequency and duty cycle combinations may affect the results in a particular application.
Output frequencies are based on a 1-MHz MCLK. The maximum output frequencies scale directly with MCLK.
Figure 5-4 Maximum Output Frequency vs Number of Timer Signals
Table 5-2 Maximum Output Frequency(1)(2)
Number of Timer Signals MSP430F5529 Timer_B MSP430G2452 Timer_A
Minimum Period Count Maximum Frequency(3)
(kHz)
Minimum Period Count Maximum Frequency(3)
(kHz)
1 50 20 50 20
2 100 10 100 10
3 170 5.882 150 6.667
4 240 4.167
5 320 3.125
6 410 2.439
7 500 2
The data in Table 5-2 was generated from testing on an MSP430G2452 and an MSP430F5529 producing signals of the same period.
This data is provided only as a general guideline for the required timer source frequency to produce the desired output frequencies, and should not be regarded as a data sheet specification. Other factors like the other interrupts in the system, the construction of the ISR code, or different frequency and duty cycle combinations may affect the results in a particular application.
Maximum frequency with a 1-MHz MCLK. The maximum frequencies scale directly with MCLK. For example, maximum frequency at 16-MHz MCLK = 16 x maximum frequency at 1-MHz MCLK