00001 /** @file hal/micro/cortexm3/nvm-def.h 00002 * @brief Data definitions for the Cortex-M3 Non-Volatile Memory data storage 00003 * system. 00004 * See @ref nvm for documentation. 00005 * 00006 * See hal/micro/cortexm3/nvm-def.h for source code. 00007 * 00008 * <!--(C) COPYRIGHT 2010 STMicroelectronics. All rights reserved. --> 00009 */ 00010 00011 /** @addtogroup nvm 00012 * @brief Data definitions for the Cortex-M3 Non-Volatile Memory data storage 00013 * system. 00014 * 00015 * This header defines all of the data sets in the NVM data storage. Each 00016 * piece of data in NVM storage uses an offset to indicate where the data 00017 * lives and a size to indicate the size of that data. Both the offset 00018 * and size are defined in bytes and must be a mupltiple of 16bits. The 00019 * offset is from the start of an NVM page, defined by NVM_LEFT_PAGE and 00020 * NVM_RIGHT_PAGE. The offset and size must be below the maximum size 00021 * of NVM storage as defined by NVM_DATA_SIZE_B. All NVM data must start 00022 * above NVM_MGMT_SIZE_B, since this is where the management bytes live. 00023 * 00024 * @note This file is not directly used by the nvm.c or nvm.h files. This 00025 * file is intended to be a convenient place to define all data that 00026 * lives in NVM so it can be seen together in one group. nvm.h includes 00027 * this file which means any code that includes nvm.h to call the read 00028 * and write functions also has access to these defines. 00029 *@{ 00030 */ 00031 00032 #ifndef __NVM_DEF_H__ 00033 #define __NVM_DEF_H__ 00034 00035 //The bottom 64 bytes of NVM storage is allocated to radio calibration 00036 //values. These 64 bytes *must* exist for the radio to function. 00037 #define NVM_RADIO_CAL_OFFSET (NVM_MGMT_SIZE_B+0x0000) 00038 #define NVM_RADIO_CAL_SIZE_B 64 00039 00040 //IMPORTANT: Data storage starts at offset 0x0040. 00041 00042 //Three example pieces of data: 00043 #define NVM_FOO_OFFSET (NVM_MGMT_SIZE_B+0x0040) 00044 #define NVM_FOO_SIZE_B 2 00045 #define NVM_HAM_OFFSET (NVM_MGMT_SIZE_B+0x0042) 00046 #define NVM_HAM_SIZE_B 10 00047 #define NVM_SPAM_OFFSET (NVM_MGMT_SIZE_B+0x004C) 00048 #define NVM_SPAM_SIZE_B 20 00049 00050 /** @} END addtogroup */ 00051 00052 #endif // __NVM_DEF_H__ 00053