52235 - moving vector table to RAM

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

52235 - moving vector table to RAM

1,601 次查看
GudeADS
Contributor III
in the sysinit code, the vector table is copied to RAM

/* Copy the vector table to RAM */
if (__VECTOR_RAM != VECTOR_TABLE)
{
for (n = 0; n 256; n++)
__VECTOR_RAM[n] = VECTOR_TABLE[n];
}
mcf5xxx_wr_vbr((uint32)__VECTOR_RAM);



why does it has to like this. I tried to do just
mcf5xxx_wr_vbr((uint32)VECTOR_TABLE);
to use the vector table in flash, but this does not work at all.

I do not need to remap any irq vectors at runtime, so I hoped to use a fixed vector table undestroyable by errounous ram accesses.
标签 (1)
0 项奖励
回复
1 回复

681 次查看
PaoloRenzo
Contributor V
Do you try to only erase this "for" cycle and vector base address modification? By default, VBR and FLASH are in 0x0000_0000, so it should work without this copy Vector table from ROM to RAM.

Good luck,
0 项奖励
回复