|
|
|
|
@ -68,14 +68,13 @@
|
|
|
|
|
* 1.Normal mode: no more limitations
|
|
|
|
|
* 2.Wear leveling mode: system section will used an flash section and the data section will used at least 2 flash sections
|
|
|
|
|
* 3.Power fail safeguard mode: ENV area will has an backup. It is twice as normal mode.
|
|
|
|
|
* 4.wear leveling and power fail safeguard mode: The system section will used an flash section.
|
|
|
|
|
* The data section is twice as wear leveling mode data section size.
|
|
|
|
|
* 4.wear leveling and power fail safeguard mode: The required capacity will be 2 times the total capacity in wear leveling mode.
|
|
|
|
|
* For example:
|
|
|
|
|
* The EF_ERASE_MIN_SIZE is 128K and the ENV_USER_SETTING_SIZE: 2K. The ENV_AREA_SIZE in different mode you can define
|
|
|
|
|
* 1.Normal mode: 1*EF_ERASE_MIN_SIZE
|
|
|
|
|
* 2.Wear leveling mode: 2*EF_ERASE_MIN_SIZE (It has 2 flash section to store ENV. So ENV can erase at least 200,000 times)
|
|
|
|
|
* 2.Wear leveling mode: 3*EF_ERASE_MIN_SIZE (It has 2 data section to store ENV. So ENV can erase at least 200,000 times)
|
|
|
|
|
* 3.Power fail safeguard mode: 2*EF_ERASE_MIN_SIZE
|
|
|
|
|
* 4.Wear leveling and power fail safeguard mode: 5*EF_ERASE_MIN_SIZE
|
|
|
|
|
* 4.Wear leveling and power fail safeguard mode: 6*EF_ERASE_MIN_SIZE
|
|
|
|
|
* @note the log area size must be more than twice of EF_ERASE_MIN_SIZE
|
|
|
|
|
*/
|
|
|
|
|
/* backup area start address */
|
|
|
|
|
@ -88,7 +87,7 @@
|
|
|
|
|
#define ENV_AREA_SIZE (1 * EF_ERASE_MIN_SIZE) /* 128K */
|
|
|
|
|
#else
|
|
|
|
|
/* ENV area total bytes size in wear leveling mode. */
|
|
|
|
|
#define ENV_AREA_SIZE (4 * EF_ERASE_MIN_SIZE) /* 512K */
|
|
|
|
|
#define ENV_AREA_SIZE (3 * EF_ERASE_MIN_SIZE) /* 384K */
|
|
|
|
|
#endif
|
|
|
|
|
#else
|
|
|
|
|
#ifndef EF_ENV_USING_WL_MODE
|
|
|
|
|
@ -96,7 +95,7 @@
|
|
|
|
|
#define ENV_AREA_SIZE (2 * EF_ERASE_MIN_SIZE) /* 256K */
|
|
|
|
|
#else
|
|
|
|
|
/* ENV area total bytes size in wear leveling and power fail safeguard mode. */
|
|
|
|
|
#define ENV_AREA_SIZE (5 * EF_ERASE_MIN_SIZE) /* 640K */
|
|
|
|
|
#define ENV_AREA_SIZE (6 * EF_ERASE_MIN_SIZE) /* 768K */
|
|
|
|
|
#endif
|
|
|
|
|
#endif
|
|
|
|
|
/* saved log area size */
|
|
|
|
|
|