15.4.3.4 PWM Generator Triggers

Each PWM Generator must receive a Start-of-Cycle (SOC) trigger to begin a PWM cycle. The trigger signal can be supplied by the PWM Generator itself (self-triggered) or another external trigger source. The SOC trigger can be generated from three sources:

  • An internal source operating from the same clock source selected by the SOCS[3:0] bits (PGxCON[19:16])
  • An external source selected by the PWM Control Input (PCI) Sync block
  • A software trigger request, write to TRSET (PGxSTAT[7])

Any of the PWM Generators may act as a ‘host’ by providing the trigger for other PWM Generators. Many trigger configurations may be achieved, including:

  • Multiple PWM outputs with independent periods (no synchronization between 
PWM Generators)
  • Multiple PWM outputs with synchronized periods (synchronized operation)
  • Multiple PWM outputs with offset phase relationships (triggered operation)

Synchronized operation is achieved by setting a (client) PWM Generator’s SOCSx bits to that of another (host) PWM Generator, with the host’s PGTRGSEL[2:0] bits (PGxEVT1[18:16]) set to ‘000’. This selects the host’s EOC to be used as the client’s SOC trigger. When using PGxTRIGy to phase offset PWM Generators from one another, a synchronization delay of up to five pwm_master_clk are present. If the TRIG value is ‘0’, there will still be an offset. The TRIGy value may need to be compensated for the application.

Triggered operation is achieved in a similar way, but with the host’s PGTRGSEL[2:0] bits (PGxEVT1[18:16]) set to select one of the PGxTRIGy counters (y = A through F). The value specified in the host’s TRIGy register defines the client’s trigger offset from that of the host’s SOC.

The SOCS[3:0] control bits have two special selections. When SOCS[3:0] = 0000, the PWM Generator is internally triggered. When SOSC[3:0] = 1111, no trigger source is selected. This selection is useful when the PWM Generator will be triggered only by software, using the TRSET bit, or from a source connected to the PCI Sync block. In this mode, the next PWM cycle will not start until another trigger is received. The sources available to the PCI Sync block include external signals, such as comparator events and device I/O pins, etc. One of the important functions of the PCI Sync block is to synchronize external input signals into the clock domain of the PWM Generator. See PWM Control Input (PCI) Logic Blocks for more information on the PCI block. The PCI Sync can be OR’d into any of the other Start-of-Cycle inputs (SOCS[3:0]) as long as the block is enabled. The trigger output of another PWM Generator can also be used as a SOC event. See Event Selection Block for configuration options.