Zef,
CW project wizard generated XGATE enabled project enables XGATE and triggers XGATE software interrupt, which is triggered to run again and again. You need to modify SoftwareTrigger0_Handler in xgate.cxgate and place there code to read PTIT bit and copy it to PTP bit.
This should work for low freq. PWM's.
Please keep in mind however that you need to either have nothing else connected to port P pins (only copied PWM), or use XGSEM register from CPU12X code and csem() / ssem() calls from XGATE code to prevent simultaneous accesses to PTP register. Else weird things may happen.