Hello,
We're working on an IAP solution. The iap function is running in ram (placed via RAMFUNC macro).
Erasing of flash sectors 0,1, 2 and 4 through 15 are successful (via FLASHIAP_EraseSector()) but if we attempt to erase sector 3 we experience a Hard Fault. The image size is ~ 260k bytes. We believe we have all application level interrupts disabled (can, usb etc). The Interrupt Vector Table has been copied to ram and the VTOR is pointing at the table in ram.
Anyone have any ideas or experience with a similar issue?
LPC54608 MPU
Thanks
Hello,
I determined the issue. We had placed the FLASHIAP_* functions in ram and needed to set the THUMB bit in the function call to iap_entry (which was also in ram).
((IAP_ENTRY_T)(FSL_FEATURE_SYSCON_IAP_ENTRY_LOCATION | 1))(command, result);
I have no idea why the HARD_FAULT was only being seen when erasing sector # 3.
Thanks
Hi Patrick Hudson,
I was wondering if you can share a compile-able demo, then I can replicate the phenomenon on my site.
Have a great day.