How to read data from internal P-Flash for KL26?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

How to read data from internal P-Flash for KL26?

跳至解决方案
1,041 次查看
yenhsu
Contributor III

Hello,

I am trying to use internal P-flash of KL26 as a NVM to save data, of course I will carefully not to access the area that stored binary source code to mess it up then cause the system crash. It seems to me that I can use "FTFA_FCCOB0" command to write or erase a sector, but I would like to know how to read data from internal flash for KL26. I will deeply appreciate if someone who can teach me about this? (It would be better if you can provide an example code for a reference.)

Thanks

1 解答
944 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Chris Chen,

    You are welcome!

    If your question is solved, please mark the correct answer to close this question, thank you!


Have a great day,

Kerry

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

在原帖中查看解决方案

0 项奖励
回复
3 回复数
944 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hello Chris chen,

    Read flash data is very easy, just read the according address is OK, you don't need to use any other flash command.

  Take an example, printf the data in address 0x0008:

printf("0x%x,",*((uint32_t *)(0x00000008)));

(uint32_t *)(address);//address is just the flash address where you want to read the data.

Wish it helps you!


Have a great day,
Kerry

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

944 次查看
yenhsu
Contributor III

Hi Kerry,

It's really helpful to me. Thank you very much. :smileyhappy:

Regards,

Chris.

0 项奖励
回复
945 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Chris Chen,

    You are welcome!

    If your question is solved, please mark the correct answer to close this question, thank you!


Have a great day,

Kerry

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

0 项奖励
回复