PTCON1.7 = 1 seem to point to an issue with your pwm timebase interrupt , what does that look like any asm code in it, maybe incorrect banksel
if you disable interrupts does the problem persist ?
can you make a simplified cut down version that still demonstrates the problem




Bookmarks