Running from SPIFI causes immediate hard fault

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by bunrockter on Wed Feb 13 00:13:07 MST 2013
I have have Hitex board (One of the newer ones). I am using crossworks, and can run my programs just fine from SRAM. but when I switch to running them from SPIFI, immediately upon breaking at the first instruction the faultmask register gets masked (it stays that way until I erase the SPIFI, and kill power). The code will continue to run, but interrupts wont fire since faults are masked.. If I clear the mask, the code immediately hard faults and the vector table bit is set in the hard fault status register. From what I can find in the ARM documentation this means that there was either a bus fault while accessing the vector table, or there was an offset error while accessing the vector table.

I even get this issue when running the example code supplied by crossworks. I have spoken with them, and they said it works just fine for them. Has anyone else run into this? The exact same code runs just fine in SRAM, but when I run from SPFI (well copy from SPIFI into RAM and then run actually) I fault every time. I have to Clear out the SPIFI and then cut power to the board before I can run from ram again, or I get the fault (perhaps the bit is sticky? A reset doesn't even do it)

Any suggestions would be greatly appreciated.