I am convinced that the Timer Overflow flag (Bit 13 of TMRx_SCTRLn) does not work.
I have configured my timer to count from 0x0000 to 0xffff, then overflow. I have set the Compare to 0x7fff so I can be sure that the timer is not being reset by the Compare.
I can see the TMRx_CNTR counting from 0x000 to 0xffff, but TOF is always zero.
I can see the Compare flag TCF functions as I expect.
All of the examples use the Compare flag / interrupt, none of them use the Overflow.
I have tried both TMR1 and TMR2, and different channels on both.
SCTRL = 0x9000: TCF=1, TOFIE=1.
COMP1 = 0x7fff
CTRL = 0x3e00: CM=1, count rising of primary source, PCS=1111, Count source is IP Bus div 128, Count repeatedly, Length=0, rollover at 0xffff, count up.
ENBL = 0x000f: timers enabled.
Has anybody seen this feature actually work?