SLAU846A June 2023 – October 2023 MSPM0G1105 , MSPM0G1106 , MSPM0G1107 , MSPM0G1505 , MSPM0G1506 , MSPM0G1507 , MSPM0G3105 , MSPM0G3105-Q1 , MSPM0G3106 , MSPM0G3106-Q1 , MSPM0G3107 , MSPM0G3107-Q1 , MSPM0G3505 , MSPM0G3505-Q1 , MSPM0G3506 , MSPM0G3506-Q1 , MSPM0G3507 , MSPM0G3507-Q1
There are five stages to configuring output signal generation in TIMx devices:
Counter and CC Block Event Generation
The counter block contains the counter and produces a load event (L), zero event (Z), and direction of counting based on the counting mode used.
The CC blocks contain the CC register and can generate two types of output signals: compare match events and capture events. Please see Table 25-15 for the compare events that can be generated.
Output Generation, Selection and Inversion
The TIMx.CCACT register specifies the waveform generation of a CCP output depending on the counting mode and counter compare actions.
TIMx.OCTL_xy[0/1].CCPO controls the CCP output selection from the output generation unit, output generation unit with deadband (TIMA only), counter events, compare events, capture events, fault events, or signal inputs. The output disable register (ODIS) can optionally disable the CCP output to optionally hold the CCP output low during configuration or shutdown. TIMx.OCTL_xy[0/1].INV controls final inversion options.
On TIMA devices only, CCP complimentary output channels can be generated from the output generation unit (denoted by "N" in the signal name). For instance, TIMA0 channel 2 (TIMA0_C2) can also produce a complimentary output (TIMA0_C2N). The CCPO and INV bits also controls the selection and inversion options for the complementary output.
Complimentary outputs with deadband insertion are a common use case for inverter-based applications with half-bridge topologies. For more information, please see Section 25.2.5.2.4.
Software Force Output
The output of the signal generator can be overwritten in software by setting CCCTL_xy[0/1].SWFRACT to a nonzero setting. For TIMA devices only, the complementary output of the signal generator can be overwritten by setting CCCTL_xy[0/1].SWFRACT_CMPL to a nonzero setting.
For more information, see Section 25.2.5.3.
Fault / Debug Output Generation (TIMA only)
On TIMA devices, the CCP output can be overwritten after the software force output block if there is a system fault (FAULT), fault condition upon exit (FEXACT), fault condition upon entry (FENACT), an asynchronous fault (FAULT_ASYNC), or the debugger is halted (DEBUG_HALT).
For more information, see Section 25.2.6 and Section 25.2.10.
Counter Compare Initial Value and Enable
To specify an initial value for the CCP output while the counter is disabled, set OCTL_xy[0/1].CCPIV to 0 for a low value or 1 for a high value. This is useful for applications where CCP outputs need to be in a default state before enabling the counter.
To enable the counter, set TIMx.CTRCTL.EN to 1.