15.4.3.9.1 ADC Triggers
Each PWM Generator has the capability to trigger multiple ADCs, either internal or external to the device. ADC triggers are based on the TRIGy (where y = A through F) compare events for timing within the PWM cycle. The ADC triggers are also used as triggers for other peripherals and functions, such as the PTG, DAC and interrupts. The ADC triggers are also made available externally through the Event Output block or internally in conjunction with the CPU interrupt controller.
Multiple TRIGx sources may be enabled to create the ADC trigger output, and when enabled, they are logically OR’d together. If the multiple TRIGx registers are enabled to produce ADC trigger events, they must be configured to allow unique trigger events to the ADC.
Each PWM Generator can generate two ADC triggers: ADC Trigger 1 and ADC Trigger 2. The two trigger outputs are useful for SMPS applications, where it is often desirable to measure two quantities in a single cycle. Each trigger is connected to a separate ADC, or possibly, a separate ADC trigger input. The ADC Triggers output have an additional offset and postscaler function to allow these functions:
- Postscaler, to reduce the frequency of ADC trigger events.
- Offset, a one-time offset may be applied to ADC trigger events. This allows postscaled trigger events to be interleaved with trigger events from other PWM Generators.
ADC Trigger outputs may be postscaled using the ADTRxPS[4:0] control
bits to reduce the frequency of ADC conversions. In addition, the ADC Trigger outputs can
be offset by a certain number of trigger events using the ADTRxOFS[4:0] control bits.
Together, these two sets of control bits allow the user to establish an interleaved set of
ADC triggers from multiple PWM Generators. In addition, ADC trigger events may be simply
postscaled to reduce the frequency of ADC measurements. If the ADTRxPS[4:0] control bits
are set to ‘00000
’, an ADC trigger event will be
produced on every PWM cycle. When these control bits are set to a non-zero value, an ADC
trigger will be produced during the PWM cycle after the ON bit is set and every N cycle
thereafter. The ADTRxOFS[4:0] bits value establishes a one-time offset of 0 to 15 trigger
events after the ON bit has been set. After this offset has been established, the trigger
postscaler will begin to count the number of trigger events determined by the ADTRxPS[4:0]
bits value. When interleaving ADC triggers from multiple PWM Generators, all PWM Generators
should be programmed to have the same period to ensure consistent spacing between the
trigger events.