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

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

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

ソリューションへジャンプ
1,039件の閲覧回数
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 解決策
942件の閲覧回数
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 返答(返信)
942件の閲覧回数
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!
-----------------------------------------------------------------------------------------------------------------------

942件の閲覧回数
yenhsu
Contributor III

Hi Kerry,

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

Regards,

Chris.

0 件の賞賛
返信
943件の閲覧回数
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 件の賞賛
返信