IAP checksum read

Hi,

I'm using the P89LPC932A1 and attempting to read the global checksum using IAP during normal program execution. I have used this knowledgebase article as my guide:

http://www.keil.com/support/docs/2554.htm

So basically, I added this function to my code:

long unsigned IAP_ReadGlobalCRC (void)  {
  ACC = 6;                                          // MOV  A,#06H
  return ((unsigned char (code *)(void)) 0xFF03)(); // LJMP 0FF03H
}

As you can see, I changed the IAP vector from FF00 to FF03, which is what it should be. When I run the code on a real part, I do not get what I expect to get back. I generally receive back something like 0x0000000056. This is not the correct global checksum. Am I missing something? Thanks, Phil

Parents Reply Children
No data
More questions in this forum