52235 - moving vector table to RAM

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

52235 - moving vector table to RAM

1,663件の閲覧回数
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 返信

743件の閲覧回数
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 件の賞賛
返信