Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
7 years, 11 months ago.
Are there mbed functions to use the E2PROM memory as a long term storage ?
Title says it all really - can one access the E2PROM from mbed libraries. this would be great as a way to store settings and other data during power off.
Question relating to:
1 Answer
7 years, 11 months ago.
Hi Chris. I think you are wanting to access the INTERNAL EEprom for R/W mode of the LPC11U35 ? If yes, the following post may help (although the LPC11U35 is not specifically noted but worth a try):
https://developer.mbed.org/users/okano/code/IAP_internal_flash_write/
Otherwise, you have many options. External EE are very low cost (varying with density) and are typically I2C bus interface. Using 2 pull-up resistors (mandatory) to 3v3 and a free I2C port on your LPC11U35 micro + mbed code, you are all set to go. The EEprom should be well under USD 25 cents (we pay around 6 cents in a full T&R qty) - check Digikey, etc for the 93C46 memory.
The following mbed routine is fine to consider for external I2C memory access:
http://www.ngolongtech.net/2016/03/mbed-write-and-read-data-with-eeprom-i2c.html
https://developer.mbed.org/users/okano/notebook/i2c-access-examples/
PS: There have been advancements made in the EEprom world that allow for automatic writes in the absence of power. If your budget permits for the higher EERAM cost, consider the following innovation from Microchip:
http://www.microchip.com/design-centers/memory/serial-eeram
With EERAM, you are working with SRAM (not EEprom) so the R/W limits are removed. With a power fail, the device will automatically save to the EEprom storage. Data storage life is 200+ years. By that time, the warranty of your widget should expire.
Update *
Hi Chris. The above mbed URL appears to support the internal EEprom found on the LPC11U24 so worth a review on how to implement for your target LPC11U35 device. The mbed LPC11U35 page states that 2k EEprom is present on this CPU yet the NXP datasheet reports 4k of EEprom. Either way, it is a nice feature to have. The EEprom is internal to this device.
http://www.nxp.com/documents/data_sheet/LPC11U3X.pdf
thanks for this , EERAM is quite nice by the sound of it. The description of this board mentioned 2kB e2prom in addition to the flash and ram so was wondering if it was an extra feature of the ic..
cheers
Chris
posted by 04 Jan 2017I use Microchip EERAM in my projects to store configuration data. So I wrote a library to handle this device. https://developer.mbed.org/users/vargham/code/EERAM/ Feel free to use it or to suggest improvements.
posted by 28 Apr 2017