Pic30F4011 EMUD/C NONE,1,2,3 shifted when Configuration Bits set in code
Programming the dsPic30F4011 i need the I2C pins 25,26 while debugging, setting EMUD3 did not work.
PK3Err0040: The target device is not ready for debugging.
Windows 10, MPLAB IDE v8.92, C30 v3_02, PICkit3_r7.
By several tests, found the EMUD/C number specified was downshifted by 1, see table below:
Set in code --- Shown in Configure/Configuration bits/ use EMUCx and EMUDx
NONE --- 3
2 --- 1
3 --- 2
After this detection, I specified None and used EMUD/C3 at pins 2,3 and it worked as expected.