Skip to content

Information memory (EEPROM) API

George edited this page Jul 5, 2019 · 9 revisions

Information memory flash segments aka EEPROM

The CC430 family of MCUs comes with an area of the flash that can store data permanently, similar to what EEPROM does in Arduino AVR. The CC430F5137 contains 512 Bytes of information memory segmented in 4 areas (Info A, Info B, Info C, Info D) of 128B each. Their address spaces start from 001800h to 0019FFh. The way these addresses are accessed, written or erased is through the STORAGE API that panStamp provides.

An example code is as it follows:

STORAGE nvMem;
uint8_t value;
uint8_t value_read;

// Read from info/eeprom memory. Contents read using this function will be stored in the variable "value_read".
nvMem.read(&value_read, section, position, sizeof(value_read));

// write into info/eeprom memory. Contents written using this function come from the variable "value".
nvMem.write(&value, section, position, sizeof(value));

Section can be of the following (from first to last section): INFOMEM_SECTION_D INFOMEM_SECTION_C INFOMEM_SECTION_B INFOMEM_SECTION_A DEFAULT_NVOLAT_SECTION or any physical address like 0x1A0A although this is better suited for reading only

Position can be of the following: 0 to 127

More information about the addresses: panStamp NRG 3 Technical Details

Anti Swap

API for Anti Swap

Clone this wiki locally