15.4.3.10.1 Synchronizing Multiple PWM Generator Buffer Updates

The MSTEN control bit (PGxCON[27]) allows the PWM Generator to control register updates in other PWM Generators. The UPDREQ control and UPDATE status bits can be effectively broadcast to other PWM Generators to allow coherent register updates among a set of PWM Generators that control a common function. When MSTEN is set and the user software (or the PWM Generator hardware) sets the UPDREQ control bit, this event will be broadcast to all other PWM Generators. If UPDMOD[2:0] = 01x in a PWM Generator that receives the request, the receiving module will set its local UPDREQ bit. The local UPDATE status bit will then be cleared when the local registers have been updated. The user software may set a local UPDREQ bit manually.

Table 15-10. PWM Data Register Update Modes
UPDMOD[2:0]ModeDescription
000SOCUpdate Data registers at the start of next PWM cycle if UPDREQ = 1. The UPDATE status bit will be cleared automatically after the update occurs.
001ImmediateUpdate Data registers immediately, or as soon as possible, if UPDREQ = 1. The UPDATE status bit will be cleared automatically after the update occurs.
010Client 
SOCUpdate Data registers at the start of next cycle if a host update request is received. A host update request will be transmitted if MSTEN = 1 and UPDREQ = 1 for the requesting PWM Generator.
011Client ImmediateUpdate Data registers immediately, or as soon as possible, when a host update request is received. A host update request will be transmitted if MSTEN = 1 and UPDREQ = 1 for the requesting PWM Generator.
Note:
  1. The UPDREQ bit must be set at least three sys_clk cycles, followed by three PGx_clk cycles, followed by another three sys_clk cycles, before the next PWM cycle boundary in order to take effect. Otherwise, the data update will be delayed until the following PWM cycle.

Synchronizing Multiple PWM Generator data updates:

  1. Configure host PG for SOC updates and write MSTEN = '1'.
  2. Configure client(s) PG for 'Client SOC' mode by writing UPDMOD = 0b0101.
  3. Configure host PWM interrupt for SOC (default).
  4. When interrupt event occurs:
    1. Read host UPDATE bit and verify it is '0'.
    2. Write new data values to all PWM generators (PGx).
    3. Set host UPDREQ bit to a '1' to commit data to PWM buffer.

On the next SOC, all PWM generators configured as clients will operate with new data values.

For the purpose of Data register updates, a PWM cycle length is variable. A PWM cycle may comprise one, two or four timer cycles, depending on the PWM Operating mode and the Output mode that is selected. The PWM Data registers may be updated on the next, second or fourth timer cycle when a SOC update has been requested. Table 15-11 summarizes the number of timer cycles between each SOC update vs. the PWM Generator Operating mode and the Output mode.

Table 15-11. Timer Cycles per Data Register Update
PWM ModeOutput ModeTimer Cycles
 per PWM CycleTimer Cycles
 per Interrupt
 and Data Register Update
Independent Edge, Dual PWM or Variable PhaseIndependent Output, 
Complementary11
Independent Edge, Dual PWM or Variable PhasePush-Pull22
Center-AlignedIndependent Output, 
Complementary22
Center-AlignedPush-Pull44
Double Update Center-Aligned or Dual Edge Center-AlignedIndependent Output, 
Complementary21
Double Update Center-Aligned or Dual Edge Center-AlignedPush-Pull41