nvs_flash_init make the firmware constantly reboot

vinimac
Posts: 24
Joined: Sun May 06, 2018 1:04 pm

nvs_flash_init make the firmware constantly reboot

Postby vinimac » Mon Oct 04, 2021 10:11 pm

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

vinimac
Posts: 24
Joined: Sun May 06, 2018 1:04 pm

Re: nvs_flash_init make the firmware constantly reboot

Postby vinimac » Tue Oct 05, 2021 12:48 pm

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


Who is online

Users browsing this forum: No registered users and 150 guests