After no more problems for several weeks another one has arisen again involving register writes of the HSPWM module but this time a simple mov instruction! The code snippet is
mov #66,w0
mov w0,PHASE3
And the watch window after a breakpoint just afterwards
PHASE3 0x1200 4608 00010010 00000000
If however I single step (F7) the same code it works
So far I have changed the chip, same result, they are both mask A3, nothing apparent in errata
I will see if enhancing the decoupling makes any differance, added extra 100nF every pwr pin pair, no change.
In previous versions of code this particular code worked fine, makes me very worried indeed
BTW this is during initialisation so interrupts are disabled.
I should mention this is my first use of PIC24EP I have never experienced anything like this with 18F's etc, my tools are PK3 & MPLAB 8.92