Hard Fault when erasing Flash sector 3

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

Hard Fault when erasing Flash sector 3

757件の閲覧回数
patrickhudson
Contributor III

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

ラベル(1)
0 件の賞賛
2 返答(返信)

548件の閲覧回数
patrickhudson
Contributor III

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

0 件の賞賛

548件の閲覧回数
jeremyzhou
NXP Employee
NXP Employee

Hi Patrick Hudson,

Thank you for your interest in NXP Semiconductor products and 
the opportunity to serve you.

I was wondering if you can share a compile-able demo, then I can replicate the phenomenon on my site.

Have a great day.

TIC
 
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
0 件の賞賛