Persistent config/settings

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

Persistent config/settings

617 Views
martin_due
Contributor II

Hi!

We are using the LPC54605 MCU. We have a secondary bootloader which loads/updates the main application via a simple read from a USB-stick. 

If we want to save some data between updates or reboots (setting the main LED color etc.), what is a good way to do so? Using IAP to save data/struct in flash? Or some other way?

Thx,

Labels (2)
0 Kudos
3 Replies

527 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Martin Due,

Thank you for your interest in NXP Semiconductor products and
for the opportunity to serve you.
In my opinion, I'd like to suggest you use the EEPROM store small quantity data, in the LPC546xx, it contains an EEPROM area.

Have a great day,
TIC

 

-------------------------------------------------------------------------------
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

527 Views
martin_due
Contributor II

Hello Jeremy,

That sounds like a good thing to use, however I think the SDK iap_eeprom example does not work?

When it runs the: 
status = IAP_ReadEEPROMPage(DEMO_IAP_EEPROM_PAGE, s_ReadBuf, SystemCoreClock);

The bytes written back are not the same. Not there is a ticket on this here:

LPC546xx: Enable EEPROM clock in AHBCLKCTRL0 before IAP EEPROM write API 

But as far I can tell the SDK example does this properly by calling: CLOCK_EnableClock(kCLOCK_Eeprom);

How do I get it to work? Are there other examples or something? The fsl_eeprom.c does not have any READ procedures available.

Thx,

0 Kudos

527 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Martin Due,

Thanks for your reply.
1) The fsl_eeprom.c does not have any READ procedures available.
It's available to read the value of EEPROM via the AHB bus, the sample code like the below shows.
 uint32_t eeprom_data = *((uint32_t *)(FSL_FEATURE_EEPROM_BASE_ADDRESS + i * FSL_FEATURE_EEPROM_PAGE_SIZE );

Have a great day,
TIC

 

-------------------------------------------------------------------------------
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