This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software:
How do I access the eeprom on the MSP-EXP430F5529LP? I'm trying to have a simple code on energia to simply write to 2 LEDs using a button but I want the controller to remember which LED was on before I unplug the controller so when I plug it back in it turns on the LED that was on before but having a bit of trouble doing that. I know eeprom is something about storing memory even while the robot is offline but I don't know how to use it to turn on the LED. can somebody help me?
Hi Benjamin,
I would recommend looking up the Flash writing examples in our SDK and modifying the address target to the EEPROM address. If that doesn't work, consider this I2C EEPROM write method I found in another E2E thread.
Best Regards,
Diego Abad
where can I find these flash writing examples and how do I modify their address target? I'm really new to all this stuff so I don't fully know how any of this works
What platform are you using? You mentioned the Launchpad, but also a "robot", which would (presumably) be a different platform. The distinction would be whether you are working with an external EEPROM or some internal EEPROM.
For an external EEPROM (separate chip on the board) you would use some serial protocol (SPI/I2C) to work with it. This is what the thread you referenced is doing. I suspect you can find some Arduino/Energia examples at Github.
The AVR (usually) has internal EEPROM, which has a controller inside the MCU, with its own set of registers (EEAR, e.g.). The closest equivalent for the MSP430 would be Information Flash [Ref User Guide (SLAU208Q) Sec 7.2], which consists of 4x128-byte Segments (A-D), each of which can be erased/written separately. (Reading requires no special treatment.)
A CCS example of this would be MSP430F55xx_flashwrite_01.c (writes/reads Information Segments C/D) here:
https://dev.ti.com/tirex/explore/node?node=A__ANRE6wdsJCmmwSxYet1HUg__msp430ware__IOGqZri__LATEST
I found Energia example flash_readwrite.ino at Github, (reads/writes using Information Segment D) here (I haven't tried it, but it seems to be part of the Energia package):
[Hint: Flash (like EEPROM) has a limited erase/write lifetime, so don't let these examples run forever.]
**Attention** This is a public forum