Skip to content

Proposal for information memory usage

midluk edited this page Sep 14, 2010 · 7 revisions

The cc430 has 4*128B information memory (flash). This memory can not be overwritten by the rfbsl and is also normally not overwritten when using the debug interface (except when using IAR).
The first page D (001800h-00187Fh) holds some calibration data set in the factory and should rather not be touched.
The remaining three memory pages are unused and could be used .

I’m proposing the following usage for the memory, so that it can be used by multiple applications without interference
beginning from address 001880h (or anywhere else on word boundary):

  1. 2 global identifier bytes (proposal: 0×5A74)
  2. 2 bytes: complete amount of application data (global identifier bytes, these bytes, maximum amount bytes and global terminator byte not counted)
  3. 2 bytes: maximum amount of data (to prevent data not managed by this structure and following on later addresses from being overwritten)
  4. application data
    1. 1 identifier byte for the application (this has to be exclusive for the applications, should be listed on this page)
    2. 1 byte amount of data for the application minus 1 (id byte, this byte and terminator byte not counted) (this means it is necessary to have at least one byte of data)
    3. any amount of data (maximum of 256B)
    4. 1 terminator byte for the application (id-byte | 0×80)
  5. repeat “4.” for other applications
  6. 1 global terminator byte (proposal: 0xda)

All 2 byte values are written as little endian (native byte order of msp430).
Functions to read, write, update and delete application data should be written so that an application only sees the data it asks for and does not have to care about the integrity of the overall structure. The terminators bytes are not strictly necessary but are just for cross checking of data integrity.

Clone this wiki locally