| |||||
Technical Support Support Resources
Product Information | ULINK: VECTOR CHECKSUM FOR NXP LPC2000 DEVICESInformation in this article applies to:
QUESTIONI am using the NXP LPC2000 devices and I came across the following statement in the NXP User's Manual: The reserved ARM interrupt vector location (0x0000 0014) should contain the 2's complement of the check-sum of the remaining interrupt vectors. This causes the checksum of all of the vectors together to be 0. When I look to the startup code, I can only see a NOP instruction at location 0x14.
Vectors LDR PC, Reset_Addr
LDR PC, Undef_Addr
LDR PC, SWI_Addr
LDR PC, PAbt_Addr
LDR PC, DAbt_Addr
NOP ; Space for Checksum
LDR PC, [PC, #-0x0FF0] ; Vector from VicVectAddr
LDR PC, FIQ_Addr
I am wondering where this checksum is generated in the Keil tools. Is the correct checksum value added automatically? ANSWERYes, the Flash checksum is generated by the ULINK Flash programmer when you download the memory image. The flash algrorithm code contains the following section that calculates this checksum. The algorithms are available in source code in the folder ..\ARM\Flash.
if (adr == 0) { // Check for Interrupt Vectors
n = *((unsigned long *)(buf + 0x00)) + // Reset Vector
*((unsigned long *)(buf + 0x04)) + // Undefined Instruction Vector
*((unsigned long *)(buf + 0x08)) + // Software Interrupt Vector
*((unsigned long *)(buf + 0x0C)) + // Prefetch Abort Vector
*((unsigned long *)(buf + 0x10)) + // Data Abort Vector
*((unsigned long *)(buf + 0x18)) + // IRQ Vector
*((unsigned long *)(buf + 0x1C)); // FIQ Vector
*((unsigned long *)(buf + 0x14)) = 0 - n; // Signature at Reserved Vector
}
MORE INFORMATION
SEE ALSOLast Reviewed: Friday, February 09, 2007 | ||||
| |||||