我在学习中断的时候,遇到问题:
AM335X_Software
static void CopyVectorTable(void)
{
unsigned int *dest = (unsigned int *)AM335X_VECTOR_BASE;
unsigned int *src = (unsigned int *)vecTbl;
unsigned int count;
CP15VectorBaseAddrSet(AM335X_VECTOR_BASE);
for(count = 0; count < sizeof(vecTbl)/sizeof(vecTbl[0]); count++)
{
dest[count] = src[count];
}
}
const unsigned int AM335X_VECTOR_BASE = 0x4030FC00;
static unsigned int const vecTbl[14]=
{
0xE59FF018, /* Opcode for loading PC with the contents of [PC + 0x18] */
0xE59FF018, /* Opcode for loading PC with the contents of [PC + 0x18] */
0xE59FF018, /* Opcode for loading PC with the contents of [PC + 0x18] */
0xE59FF018, /* Opcode for loading PC with the contents of [PC + 0x18] */
0xE59FF014, /* Opcode for loading PC with the contents of [PC + 0x14] */
0xE24FF008, /* Opcode for loading PC with (PC - 8) (eq. to while(1)) */
0xE59FF010, /* Opcode for loading PC with the contents of [PC + 0x10] */
0xE59FF010, /* Opcode for loading PC with the contents of [PC + 0x10] */
(unsigned int)Entry,
(unsigned int)UndefInstHandler,
(unsigned int)SVCHandler,
(unsigned int)AbortHandler,
(unsigned int)IRQHandler,
(unsigned int)FIQHandler
};
上面的代码是把 vecTbl[14] copy到向量入口地0x4030FC00。
问题 1: 假如发生IRQ中断,PC指针是不是等于:0x4030FC00 + 0x18, 从这里取指令?
如果是,那么这个 0xE24FF008, 是什么意思?
TI的文档或ARM有没有文档说明这个值是什么?
问题2: 从上面的vecTbl表中,我很容易看成,中断来了,PC是从 (unsigned int)IRQHandler取指,然后跑到这个函数上去。但是,TI的 starterWare为什么要加上前面那一堆数字让人难理解呢?
求解释!!!!!!! 或指出在什么地方可以查到资料.