Error Verifing Config Memory

Find out how to setup your programmer's software and how to solve many common problems.

Moderator: phalanx

Post Reply
Droidling
Posts: 3
Joined: Mon Sep 22, 2014 7:34 am

Error Verifing Config Memory

Post by Droidling » Mon Sep 22, 2014 9:46 am

I'm trying to set up for a new project using a PIC18F6622. I went through a tutorial for setting up a new project. I can get the code to run in a MPLAB SIM. When I try to load it on the PIC I get an error as follows:

initializing PICkit 2 version 0.0.3.63
Found PICkit 2 - Operating System Version 2.32.0
PICkit 2 Unit ID = BUR084216174
Target power not detected - Powering from PICkit 2 ( 5.00V)
PIC18F6622 found (Rev 0x1)
PICkit 2 Ready

Programming Target (9/22/2014 8:48:56 AM)
PIC18F6622 found (Rev 0x1)
Erasing Target
Programming Program Memory (0x0 - 0x23F)
Verifying Program Memory (0x0 - 0x23F)
Programming Configuration Memory
Verifying Configuration Memory
PK2Error0027: Failed verify (Address = 0x300008 - Expected Value 0xFF - Value Read 0xF)
PICkit 2 Ready

When I checked the data sheet for the PIC18F6622 it says that he top 4 bits of register 0x300008 (CONFIG5L) are not implemented on this chip. CONFIG5L seems to set the code protection bits. I've left it at the default. is there something I need to do to get the IDE to ignore the unimplemented bits?

I started with MPLAB X 2.05 and then went back to MPLAB 8.91. I get the same error in both. Currently I'm using the C18 compilier.

waltr
Support Volunteer
Posts: 2823
Joined: Tue Sep 08, 2009 12:07 pm
Location: Philadelphia, USA

Re: Error Verifing Config Memory

Post by waltr » Wed Sep 24, 2014 12:05 pm

Looks like you have an incorrect CONFIG bit setup in your code.
Refer to the PIC data sheet, the Compiler manual and MPLAB's Help.

Droidling
Posts: 3
Joined: Mon Sep 22, 2014 7:34 am

Re: Error Verifing Config Memory

Post by Droidling » Wed Sep 24, 2014 3:38 pm

I'm really not just being lazy. I've been trying to figure this out on my own for weeks now. Reading the datasheet, going through tutorials, searching the Microchip website for a FAQ, forum post, or anything that mentions this type of error. I've had an open post on the microchip forum for a couple of weeks but never got an answer. When I figured out that the error referred to an unimplemented section of memory I thought I'd give this group a try with the new information.

I've tried many different simple programs from different tutorials and never can get them to load.

After your comment I paired the program down to the absolute minimum. This is the entire contents of the only source file in the project:

#include <p18f6622.h>
void main (void)
{
while (1)
{
}
}

When i try to program the target I get the exact same error message; "PK2Error0027: Failed verify (Address = 0x300008 - Expected Value 0xFF - Value Read 0xF)". I'm really at the end of my rope at this point.

If anyone has an Idea, even a crazy one, I'll try it.

Terry

waltr
Support Volunteer
Posts: 2823
Joined: Tue Sep 08, 2009 12:07 pm
Location: Philadelphia, USA

Re: Error Verifing Config Memory

Post by waltr » Thu Sep 25, 2014 7:02 am

Which compiler????
Are you using MPLAB 8 or MPLAB X??? these work very differently. Same with the compilers, each has a different method for defining the CONFIG bits and are different from one version to the next version of the compilers.
Do you have the box checked in MPLAB to use the CONFIG bits written in the code? Or the CONFIG bits from MPLAB?
Are you building RELEASE or DEBUG code?
Did you select the correct PIC in MPLAB??

The other possibly is that the PICKit2 is not properly connected to the PIC. Are there any other circuits on the PIC's ICSP pins?
Did you try using the standalone PICkit2 utility to program/verify?

Droidling
Posts: 3
Joined: Mon Sep 22, 2014 7:34 am

Re: Error Verifing Config Memory

Post by Droidling » Fri Oct 31, 2014 2:19 pm

Sorry for the long delay I've been trying the work this out through the manufacutrer. I thought I should at least tell you the results.

After working with Microchip support for several weeks using first MPLab 8 and then MPLab X and compilers (C18, and XC8 I believe), they couldn't recreate the issue that I was seeing in every configuration. Finally I asked to see a schematic for the circuit they were testing on. It turned out they were testing a different chip that had all the bits implemented in the 0x300008 register. As soon as they tried the chip I was using they had the same issue. The Microchip Tech Support guy kicked it up to the product line manager. After another week the answer was that the PICKit2 support for MPLab X was in beta, and suggested that I buy a PICKit3.

I'd started testing an AVR chip as an alternate option. It seems to be working out pretty well. I did buy a PICKit3, I just haven't been able to convince myself it's worth going back to try it.

Again, my apologies for leaving you hanging for so long.

Terry

Post Reply