rtel wrote on Wednesday, March 21, 2012:
I just looked in the source file, and because the demo was created on a part for which it did not matter, SRSSEL was not manually being set. This sets the interrupt priority that will use shadow registers, which should be set, but then avoided. I would be grateful if you could try adding the following line to near the top of main.c, where you will see other #pragma directive, take out the assembly instruction you added, and let me know if it fixes your original problem.
#pragma config FSRSSEL = PRIORITY_7
Regards.