SLAAEK4 January 2024 MSPM0C1104
Cross trigger can be used to synchronize different timers. When using a main-secondary timer configuration by connecting multiple timers together, the cross-trigger feature can instruct multiple timer modules in the same power domain or across different power domains using the event fabric to start counting simultaneously.
Cross-triggers can be enabled using software, compare events from other timer instances, zero or load events, or generic subscriber events. Some applications can require more than one counter block that can be simultaneously started across the same power domain (such as TIMA0 and TIMA1) or different power domains (such as TIMA0 and TIMG0). As shown in Figure 8-9, TIMGx is the main timer and TIMAx is the secondary timer that can be cross triggered in the configuration example.
By using cross trigger, different timers can start counting simultaneously. To produce a controlled phase shift, phase load is required. In TIMA only, the phase load register provides the capability for counter to count from a value other than zero or load value in Up/Down counting mode. Phase load is used to generate asymmetric center-aligned PWM output signals with a controlled phase shift between different timer instances.
When phase load is triggered, the timer counts from the phase load value. Phase load value is latched when the timer starts. The phase load is synchronized every time when the counter reaches the previously latched phase load value. Figure 7-5 shows how the phase load register works when the timer is counting in the up-down direction and the phase load value changes to a new value.
As an example of asymmetric PWM configuration using CCP channel 0 of TIMA0 and TIMA1, firstly synchronize TIMA0 and TIMA1 using a cross trigger. Configure two center-aligned using TIMA0 and TIMA1 with the same load value and compare value to generate the same PWM frequency and duty cycle. Add a phase shift value for TIMA0 or TIMA1 by configuring the phase load value. The Asymmetric PWM is shown in Figure 7-6.
To accelerate development, please refer to the following resources.