就在这个地方需要注意的是Reset和INT1~INT12一共13个向量是没有使用的,这里只是作为一个32位无符号整数占据地址位置,而在代码中程序员没有这么写,直接是PIE1_RESERVED~PIE13_RESERVED,这让我一开始看代码的时候产生了很大困惑,因为文档中说Reset向量复位的时候是不从这个表中取的,是从boot ROM中取的,所以Reset向量这里就没写,但是CMD文件中PIE_VECT : origin = 0x000D00, length = 0x000100,中断向量表的起始地址是 0x000D00,如果不定义Reset向量,那所有后面的向量不就向前面移动了两个地址,后来我为了地址对应就在向量表定义中加入了一行 PINT Reset_RESERVED,结果编译报错,好像是CMD中分配的地址重叠了,因为多加了一项,我就把向量表中的最后一项注释掉了(group12的最后一项),编译过了,但是发现进不了指定中断(我这里用的是TI例程中看门狗中断的例子),只能进入中断向量表初始化时指定的默认中断(就是一个NOP空操作,这里多说一句,为什么一定要初始化中断向量表,因为一旦有中断发生,没有初始化中断向量表,中断向量表中的地址值是随机的,这样程序就跳转到一个随机地址,程序就跑飞了,所以开始给所有中断向量赋一个指定的地址值,一旦发生中断,程序就跳到那个地址去执行,这里TI给的代码中,这个初始化地址就是一个只包含一个NOP指令的函数不对程序产生影响),继续说我们的调试,我发现CPU是从0x0D4E这个地址中取出的中断函数(看PIECTRL Register的1~15位就知道了,第0位是PIE使能位),而手册上说WAKEINT这个中断也确实是在0x0D4E这个地址上,而我们指定的中断服务函数PieVectTable.WAKEINT = &wakeint_isr is at the next address 0x0D50 (each interrupt vector in the interrupt vector table is 32 bits). Now I basically understand that once an interrupt occurs, the CPU goes to a fixed address to get the interrupt vector. This is done automatically by the CPU hardware and cannot be changed by the software. For example, in this example, as long as the watchdog interrupt occurs, the CPU goes to the address 0x0D4E to get the interrupt vector. Okay, now we continue to criticize the lazy programmers of TI for causing us so much trouble. In fact, he did not miss the Reset vector. Carefully count the 13 placeholder addresses of PIE1_RESERVED~PIE13_RESERVED in the code. According to the manual, only INT1~INT12 is not used. INT13 is external interrupt 13 or CPU Timer1 interrupt. Okay, INT1~INT12+Reset interrupts are a total of 13 unused interrupts. TI programmers, you win, and they correspond exactly to PIE1_RESERVED~PIE13_RESERVED, so the addresses also correspond exactly, and there are no problems. Although his poor writing style made me waste several hours debugging, it also made me further understand the true nature of the interrupt mechanism.