KL03 eeprom emulation

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

KL03 eeprom emulation

Jump to solution
774 Views
gschelotto
Contributor V

Hi,

Is there any simple example to implement an eeprom emulation on KL03 microprocessor? I've checked the pflash example form the last SDK version but I'm not able to read the data previously written. I can erase, program and even verify the internal flash but how can I read back some data?

thanks in advance,
gaston

0 Kudos
1 Solution
671 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Gaston Schelotto ,

   If you want to read the data which you write to the flash, just use this code:

  Data= *(volatile uint32_t *)(destAdrss);

destAdrss is the flash address which you have wrote before.

 Actually, the example you just need to refer to the flash code in the SDK:

SDK_2.3.1_FRDM-KL03Z\boards\frdmkl03z\driver_examples\flash\pflash

This is the read code:

  s_buffer_rbc[i] = *(volatile uint32_t *)(destAdrss + i * 4);

Wish it helps you!

Have a great day,
Kerry

 

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

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

View solution in original post

0 Kudos
1 Reply
672 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Gaston Schelotto ,

   If you want to read the data which you write to the flash, just use this code:

  Data= *(volatile uint32_t *)(destAdrss);

destAdrss is the flash address which you have wrote before.

 Actually, the example you just need to refer to the flash code in the SDK:

SDK_2.3.1_FRDM-KL03Z\boards\frdmkl03z\driver_examples\flash\pflash

This is the read code:

  s_buffer_rbc[i] = *(volatile uint32_t *)(destAdrss + i * 4);

Wish it helps you!

Have a great day,
Kerry

 

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

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos