SLAAEK4 January 2024 MSPM0C1104
TIMx can be used to generate desired pulse-width modulation (PWM) output waveforms with the counter and capture/compare modules (compare match). The waveform generation of a CCP output depends on the counting mode and counter compare actions
For example, with different counting mode, edge-aligned PWM or center-aligned PWM can be generated. A typical 2-channel PWM is shown in Figure 8-9. The user can set LOAD value to configure the PWM period, or set CC value to configure the duty cycle. The user can also configure polarity of the signal, CCP output action and so on. Please refer to the TRM for specific configuration.
Both TIMA and TIMG can generate PWM. However, TIMA provides the optional feature on complimentary CCP output channels, such as TIMA0_C1 and TIMA0_C1N for a reference PWM signal on TIMA0 CCP output channel 1. Besides, TIMA0 has 4 CCP channels while TIMA1 and TIMG have 2 CCP channels. It means that TIMA0 can output 8 PWMs (4 pairs) and TIMA1 can output 4 PWMs (2 pairs), while TIMG can only output 2 PWMs.
TIMA also provides the option on deadband insertion(non-overlapping transitions in complimentary PWM signals). Multiple modes of configurable deadband can be inserted in edge-aligned or center-aligned complimentary PWMs, as shown in Figure 7-5 and Figure 7-6.
The user can configure deadband mode and timing information with the deadband control register (TIMA.DBCTL) programmed. With mode 0, rise delay and fall delay are applied with respect to the output generator signal's rising and falling edges to generate CCP and CCP complimentary signal. With mode 1, rise delay and fall delay are both applied to CCP complimentary signal only. Figure 7-5 shows the edge-aligned PWM with deadband (mode 0 only). Figure 7-6 shows the center-aligned PWM with deadband (mode 0 and mode 1).
To accelerate development, please refer to the following resources.