Interrupt Vector Table relocate to SRAM

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Interrupt Vector Table relocate to SRAM

1,042 Views
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

Labels (1)
3 Replies

760 Views
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 Kudos

760 Views
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 

760 Views
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 Kudos