ESP32-LyraT Instant Reboot

Thibaut
Posts: 1
Joined: Sat Mar 30, 2019 3:57 pm

ESP32-LyraT Instant Reboot

Postby Thibaut » Sat Mar 30, 2019 4:16 pm

Hello,

For my project I have to implement an UDP server to receive and send messages. I tried the UDP example in the IDF (C:\msys32\home\Thibaut\esp\esp-idf\examples\protocols\sockets\udp_server) and everything worked very well, I can receive and send message as expected.
So I copied this example in my project (C:\msys32\home\Peretti\esp\my_project) and flash the code on my chip, ESP32-LyraT.
But after that, the board always reboot with this error message :
ESP_ERROR_CHECK failed: esp_err_t 0x1110 (ESP_ERR_NVS_NEW_VERSION_FOUND) at 0x400d2c48
file: "C:/msys32/home/Thibaut/esp/my_project/main/udp_server.c" line 209
func: app_main
expression: nvs_flash_init()

Backtrace: 0x4008e6f0:0x3ffbb2a0 0x4008eba0:0x3ffbb2c0 0x400d2c48:0x3ffbb2e0 0x400d0cde:0x3ffbb310
.
To fix this problem, I replaced

Code: Select all

nvs_flash_init()

by

Code: Select all

esp_err_t 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);

The board stop to reboot but now I CAN receive message but I CAN NOT send message. I have the lwip errno 22 Invalid argument. I do not modified the code except for the flash init as mention.

Do you have any clues for me ?

Thanks :)

Who is online

Users browsing this forum: No registered users and 30 guests