C30 BUG or PIC24FJ192GA106 Silicon BUG?!?!?!
after a week of weasted time and a PIC24, an 8MHz Quartz and an ICD2 RJ45 cable repleaced I finally found the cause of verify and debug errors:
ICD0161: Verify failed (MemType = Program, Address = 0x1400, Expected Val = 0xFFFFFF, Val Read = 0xF30000)
ICD0275: Programming failed.
ICD0083: Debug: Unable to enter debug mode. Please double click this message for more information.
ICD0082: Failed MPLAB ICD 2 operation
ICD0069: Debug: Unable to run target
I know, I know it's incredible but you have to trust me: this error is caused by the firmware .
But now I start from the begin.......
I'm trying to implement the AN1095 (Emulating Data EEPROM....bla bla bla) in my project to store some parameter in the Program Memory, so as soon as I use the function DataEEInit() it's impossible to program and/or debug the firmware.
Ivestigating in the function code I found the bastard instruction!!!!!
NVMCON = PROGRAM_WORD; // C Code
mov.w #0x4003,0x0000 // Compiled ASM Code
If I comment (//) this instruction I can normally program and debug (I'm not shure but I think the code doesn't work without this instruction, I didn't try)
There any body of you that experimented the same problem using the NVMCON instruction?
Again, there is anibody of you that implement the function DataEEInit() successfully in his project?
Please, let me know if there is any kind of workaround or any other suggestion.
Thanks in advance
Oh, I forgot: I'm using MPLAB v8.14 and C30 v3.11