Interrupt Vector Table relocate to SRAM

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

Interrupt Vector Table relocate to SRAM

1,860 次查看
patrickhudson
Contributor III

When attempting to copy the interrupt vector table from flash (0x00000000) to either internal SRAM (0x20000000) or external SRAM (0xA0000000) a Hard Fault is generated.

The Hard Fault occurs on the first attempt to write to SRAM.

Anyone have any ideas or experience with relocating the Interrupt Vector Table to SRAM in a LPC54608 or what could be causing the Hard Fault?

Thanks

标签 (1)
3 回复数

1,578 次查看
lpcxpresso_supp
NXP Employee
NXP Employee

Is it possible interrupts are already active? I presume you delay the VTOR change until after the copy? I could understand a problem with a copy to external SRAM if the controller had not be initialized.

Thanks and regards,

MCUXpresso Support

0 项奖励
回复

1,578 次查看
patrickhudson
Contributor III

Hello,

I appear to have the cause isolated - I was using an int pointer for the reference to the flash interrupt vector table. (had copied code from a different platform)  Once I changed it to a uint32_t pointer, the Hard Fault has disappeared.

Thanks,

Patrick 

1,578 次查看
patrickhudson
Contributor III

I have attempted to disable all known interrupts prior to the table copy.

The Hard Fault occurs prior to the VTOR change.  The Hard Fault occurs at the first attempt to read the Interrupt Vector Table in Flash @ address 0x00000000;

Thanks,

Patrick

0 项奖励
回复