13.4 PWM4H/L Output on Peripheral Pin Select
All devices support the capability to output PWM4H and PWM4L signals via Peripheral Pin Select (PPS) on to any “RPn” pin. This feature is intended for lower pin count devices that do not have PWM4H/L on dedicated pins.
Configuration bit, DUPWM (FDEVOP1[12]), provides the option to disable the fixed pin PWM4L/H functions when using the PPS. Clearing the DUPPWM bit will disable PWM4 function and allow the pin to be used for another purpose. Leaving the DUPPWM set (default) will output PWM4 on both fixed pin and PPS outputs. The output port enable bits, PENH and PENL (PGxIOCONH[3:2]), control output function for both dedicated and PPS pins outputs
If PWM4H/L PPS output functions are used on devices that also have fixed PWM4H/L pins, the output signal will be present on both dedicated and “RPn” pins. The output port enable bits, PENH and PENL (PGxIOCONH[3:2]), control both dedicated and PPS pins together; it is not possible to disable the dedicated pins and use only PPS.
Given the natural priority of the “RPn” functions above that of the PWM, it is possible to use the PPS output functions on the dedicated PWM4H/L pins, while the PWM4 signals are routed to other pins via PPS. Any of the peripheral outputs listed in Table 9-5, with the exception of ‘Default Port’, can be used. Input functions, including the ports and peripherals listed in Virtual Connections, cannot be used through the “RPn” function on dedicated PWM4H/L pins when PWM4 is active.