Everytime after writing to flash some configuration data the next sprintf(..) call crashes. Sprintf does not crash if no flash writing before. The CPU is KL25 with 16K ram and 128K flash. Stack is set at 0x400.
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!
-----------------------------------------------------------------------------------------------------------------------