From f12be7ebd8c5b0006a94c1ddaa492555ffc73d78 Mon Sep 17 00:00:00 2001 From: Liu Zhi Fu Date: Thu, 17 Nov 2016 11:22:20 +0800 Subject: [PATCH 1/2] nvs_flash: adjust the nvs_flash start sector number Modify the nvs flash start sector from 6 to 9 --- components/nvs_flash/src/nvs_api.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/nvs_flash/src/nvs_api.cpp b/components/nvs_flash/src/nvs_api.cpp index c1a910260e..f6c6c588aa 100644 --- a/components/nvs_flash/src/nvs_api.cpp +++ b/components/nvs_flash/src/nvs_api.cpp @@ -63,7 +63,7 @@ extern "C" void nvs_dump() extern "C" esp_err_t nvs_flash_init(void) { - return nvs_flash_init_custom(6, 3); + return nvs_flash_init_custom(9, 3); } extern "C" esp_err_t nvs_flash_init_custom(uint32_t baseSector, uint32_t sectorCount) From 936b02216b49af02488d058e80c2b58dc771fd51 Mon Sep 17 00:00:00 2001 From: Liu Zhi Fu Date: Thu, 17 Nov 2016 11:44:39 +0800 Subject: [PATCH 2/2] docs/nvs_flash: update the nvs flash offset comment according review --- components/nvs_flash/include/nvs_flash.h | 2 +- docs/partition-tables.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/nvs_flash/include/nvs_flash.h b/components/nvs_flash/include/nvs_flash.h index 1cade0e956..d6e1990250 100644 --- a/components/nvs_flash/include/nvs_flash.h +++ b/components/nvs_flash/include/nvs_flash.h @@ -21,7 +21,7 @@ extern "C" { /** Initialise NVS flash storage with default flash sector layout Temporarily, this region is hardcoded as a 12KB (0x3000 byte) - region starting at 24KB (0x6000 byte) offset in flash. + region starting at 36KB (0x9000 byte) offset in flash. @return ESP_OK if flash was successfully initialised. */ diff --git a/docs/partition-tables.rst b/docs/partition-tables.rst index 5f5911bd52..a1a46866ee 100644 --- a/docs/partition-tables.rst +++ b/docs/partition-tables.rst @@ -23,7 +23,7 @@ Known Issues The below design document outlines the goals for the partition table system. At the moment, only some features are used: - data partition types "rf" & "wifi" are unused and can be entirely omitted to save space. -- NVS (non-volatile-storage) uses a hardcoded 12KB (0x3000 byte) region at offset 0x6000. +- NVS (non-volatile-storage) uses a hardcoded 12KB (0x3000 byte) region at offset 0x9000. Once a full user API is in place for partition access, these limitations will be resolved and you'll be able to use the partition mechanism fully for storing data in flash.