15.4.4.4 Combinatorial Logic Output

The combinatorial logic output feature can be used to generate control signals for synchronous rectification or other applications. One or more PWM Generators can be used to output a logic function with programmable input selections and logic functions. When assigned to a PWM output, the combinatorial logic function replaces the PWM signal that would normally be connected to that pin. The controls include:

  • Input sources (PWMSxy)
  • Input polarity (SxyPOL)
  • Logic AND, OR and XOR functions (PWMLFy)
  • Output destination (PWMLFyD)
    Note: An ‘x’ in a bit name denotes Input Source ‘1’ or ‘2’. A ‘y’ denotes a function instance (A-F).

An example of a device with six LOGCONy registers and combinatorial logic output functions, A-F, is shown in Table 15-14.

Table 15-14. Combinatorial Logic Instance Mapping
RegisterCombinatorial Logic InstanceAvailable Output Pin Selection
LOGCONAAPWM2H-PWM4H
LOGCONBBPWM2L-PWM4L
LOGCONCCPWM2H-PWM4H
LOGCONDDPWM2L-PWM4L
LOGCONEEPWM2H-PWM4H
LOGCONFFPWM2L-PWM4L

Figure 15-37 shows the combinatorial logic function block diagram.

Figure 15-37. Combinatorial Logic Function Block Diagram
Note:
  1. When using combinatorial logic, the two inputs from the PWM Generators must operate from the same clock source; otherwise, the outputs may not be valid. The minimum pulse width of the combinatorial output is device-specific and may be limited by the device pins.
  2. The PWM Generator outputs selected as the source inputs are taken before the PWMx output polarity control, POLH/POLL (PGxIOCON1[1:0]). If no destination is selected, the combinatorial logic is disabled. The output destination is grouped into pairs where the odd LOGCONy registers (Instances A, C and E) can only be assigned to the PWMxH output pins, and the even LOGCONy registers (Instances B, D and F) can only be assigned to the PWMxL pins. Only PWM2-PWM8 can use the combinatorial logic output; PWM1 is not available. More than one instance (A-F) of a combinatorial logic output can be assigned to a single PWM output, if desired. In the case that multiple combinatorial logic functions have been enabled and assigned to the same PWM output, the function with the lowest letter value will take priority.