We are working with a PIC24FJ512GA606. The problem is that we can't read the PIC with IPE or MPLAB X IDE.
We have configured this with Dual Partition and we have a bootloader. The configuration bits from both App and Bootloader are the same:
// FSEC
#pragma config BWRP = OFF
#pragma config BSS = DISABLED
#pragma config BSEN = OFF
#pragma config GWRP = OFF
#pragma config GSS = DISABLED
#pragma config CSS = DISABLED
#pragma config CWRP = OFF
#pragma config AIVTDIS = OFF
// FOSCSEL
#pragma config FNOSC = PRIPLL
#pragma config PLLMODE = PLL96DIV2
#pragma config IESO = ON
// FOSC
#pragma config POSCMD = XT
#pragma config OSCIOFCN = ON
#pragma config SOSCSEL = ON
#pragma config PLLSS = PLL_PRI
#pragma config IOL1WAY = OFF
#pragma config FCKSM = CSDCMD
// FWDT
#pragma config WDTPS = PS8192
#pragma config FWPSA = PR128
#pragma config FWDTEN = ON
#pragma config WINDIS = OFF
#pragma config WDTWIN = WIN25
#pragma config WDTCMX = WDTCLK
#pragma config WDTCLK = LPRC
// FPOR
#pragma config BOREN = ON
#pragma config LPCFG = OFF
#pragma config DNVPEN = ENABLE
// FICD
#pragma config ICS = PGD2
#pragma config JTAGEN = OFF
#pragma config BTSWP = OFF
// FDEVOPT1
#pragma config ALTCMPI = DISABLE
#pragma config TMPRPIN = OFF
#pragma config SOSCHP = ON
#pragma config ALTVREF = ALTREFEN
// FBOOT
#pragma config BTMODE = DUAL // Boot Mode Configuration bits->Device is in Dual Boot mode
When we try to read, we read the whole partition one to F's and the partition 2 to 0's.