Jump to content

Saving options in LPC17 flash


Sauraen
 Share

Recommended Posts

I would like to save a small amount of data (less than a kilobyte) somewhere that will always be available: configuration options, what file to load from the SD card upon startup, etc. Is it possible to allocate an array in the LPC17's flash memory that I can use to store this data? Or is the risk of corrupting the code stored there (or the bootloader!) too great, and I should just use a single BankStick permanently connected to the core?

Link to comment
Share on other sites

The LPCXPRESSO module has an external EEPROM (something like a on-board bankstick), which can be accessed through include $(MIOS32_PATH)/modules/eeprom/eeprom.mk

An application example can be found under:

http://svnmios.midibox.org/listing.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fmisc%2Fusb_osc_midi_proxy%2F

Relevant files:

Makefile: includes the EEPROM driver

mios32_config.h: configures the EEPROM function

presets.c: reads/writes into EEPROM

Best Regards, Thorsten.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...