Persistent config/settings

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

Persistent config/settings

646 次查看
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,

标签 (2)
0 项奖励
3 回复数

556 次查看
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 项奖励

556 次查看
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 项奖励

556 次查看
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 项奖励