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 }
Ouch. Didn't spot this. I think this knowledgebase article has a typo:
long unsigned IAP_ReadGlobalCRC (void) should be unsigned long IAP_ReadGlobalCRC (void)
; FUNCTION IAP_ReadGlobalCRC (BEGIN) ; SOURCE LINE # 80 ; SOURCE LINE # 81 ; SOURCE LINE # 82 0000 7406 MOV A,#06H ; SOURCE LINE # 83 0002 12FF03 LCALL 0FF03H ; SOURCE LINE # 84 0005 ?C0007: 0005 22 RET ; FUNCTION IAP_ReadGlobalCRC (END)