10.13.1.1 Interrupt Return Latency
To return from an interrupt, the program must call the RETFIE instruction. The RETFIE instruction in the dsPIC33A family of devices is expected to take around seven to ten cycles with PBU enabled.
During the first two cycles of a RETFIE instruction, the contents of the PC and the SR register are popped from the stack. After unstacking the SR (in the second cycle), the RETFIE instruction will change the context and CPU.IPL level to that defined by the unstacked SR value. The new context will be immediately available at the start of execution of the next instruction.
The third instruction cycle is used to fetch the instruction addressed by the updated
Program Counter. This cycle is executed as a NOP
instruction. On the
fourth cycle, program execution resumes at the point where the interrupt occurred.