Hi Qing Gu,
What the phenomena after your program crash? Will it enter in the default_isr?
Now, anther point need to clarify, before you do the flash operation, you need to disable the global interrupt at first. After your flash operation is finished, you can enable your global interrupt again!
Please check this point at first.
If you still have question, please contact with me!
Have a great day,
Jingjing
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------