Page 1 of 1

nvs_flash_init make the firmware constantly reboot

Posted: Mon Oct 04, 2021 10:11 pm
by vinimac
Hello,

I updated the SDK to latest version and my code is not booting. It is stopping in nvs_flash_init() function, but no error is printed.

SDK version:
commit 3e370c4296247b349aa3b9a0076c05b9946d47dc (HEAD -> master, origin/master, origin/HEAD)
Merge: 8d74bf87e 0f7b90d20
Author: morris <maoshengrong@espressif.com>
Date: Fri Sep 24 16:12:24 2021 +0000

Re: nvs_flash_init make the firmware constantly reboot

Posted: Tue Oct 05, 2021 12:48 pm
by vinimac
The code I am using:

Code: Select all

ret = nvs_flash_init();
    if (ret == ESP_ERR_NVS_NO_FREE_PAGES || ret == ESP_ERR_NVS_NEW_VERSION_FOUND) {
      ESP_ERROR_CHECK(nvs_flash_erase());
      ret = nvs_flash_init();
    }
    ESP_ERROR_CHECK(ret);
    printf("nvs_flash_init ok\n");
And the flash partitions:
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x4000
otadata, data, ota, 0xd000, 0x2000
phy_init, data, phy, 0xf000, 0x1000
ota_0, app, ota_0, 0x10000, 1M
ota_1, app, ota_1, , 1M
nvs2, data, nvs, , 500K

Re: nvs_flash_init make the firmware constantly reboot

Posted: Wed Oct 06, 2021 9:22 pm
by vinimac