Having a problem when write data into on chip flash

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Having a problem when write data into on chip flash

620 Views
jqy
Contributor I

I tried to modify the demo code" frdmkl03z_driver_examples_flash_pflash".  i coped the code from the main() to my code. It works fine to initialize the driver, read the data and even erase the sector. The problem is when it programmed the data in to the flash sector, a hard fault event happened. Any idea about this problem? 

i couldn't run the demo code on my own development board.

0 Kudos
3 Replies

498 Views
mjbcswitzerland
Specialist V

Hi

 

See http://www.utasker.com/kinetis/FRDM-KL03Z.html
At the bottom of that page there is a binary that you can try and also a link to a video explaining the operation. All code, including a number of different parameter system options, is available in the uTasker project (allows also simulation of the KL03 and its internal Flash operation).

 

Regards

 

Mark

0 Kudos

498 Views
jqy
Contributor I

Hi Mark,

Thank you for your help! 

The code is working now. The problem is not form this part of code.

Jieqiu

0 Kudos

498 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hello Jieqiu Yang,

    Thank you for your updated information!

    If your question is solved, please mark the correct answer to close this question.

    Thank you and have a nice day!


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos