Page 1 of 1

ESP32 reboots regularly within 20 minutes

Posted: Tue Nov 29, 2022 4:55 am
by buddhika
this is the error message I am getting...can't understand the reason..please help me...

I (710863) wifi:bcn_timout,ap_probe_send_start
ESP_ERROR_CHECK failed: esp_err_t 0x101 (ESP_ERR_NO_MEM) at 0x400898c4
0x400898c4: _esp_error_check_failed at C:/Users/ACER/esp/esp-idf/components/esp_system/esp_err.c:42

file: "IDF/components/esp_timer/src/ets_timer_legacy.c" line 69
func: ets_timer_setfn
expression: esp_timer_create(&create_args, (esp_timer_handle_t*)&(ptimer->timer_arg))

abort() was called at PC 0x400898c7 on core 0

Re: ESP32 reboots regularly within 20 minutes

Posted: Tue Nov 29, 2022 5:42 am
by ESP_Sprite

Code: Select all

ESP_ERROR_CHECK failed: esp_err_t 0x101 (ESP_ERR_NO_MEM) at 0x400898c4
says you ran out of RAM. Given that this happens after a fairly long while, it sounds like you have a memory leak somewhere.

Re: ESP32 reboots regularly within 20 minutes

Posted: Tue Nov 29, 2022 5:52 am
by buddhika
Dear ESP_SPRITE,
how can I identify a memory leak

Re: ESP32 reboots regularly within 20 minutes

Posted: Tue Nov 29, 2022 8:01 am
by ESP_Sprite
You could use heap tracing for that. But before resorting to that, I suggest taking a long, hard look at your code to see if you're not allocating something and then not freeing it; that's basically what a memory leak boils down to.

Re: ESP32 reboots regularly within 20 minutes

Posted: Tue Nov 29, 2022 10:54 am
by buddhika
Dear ESP_SPRITE,
Thanks for the help... there was a code like this
esp_err_t err_is_charger_locked = load_int_value("isLocked:", &isChargerLocked);
if (err_is_charger_locked != ESP_OK)
{
ESP_LOGE(TAG, "Error (%s) loading to NVS", esp_err_to_name(err_is_charger_locked));
}

where as the isChargerLocked is not initialized that caused the memory leak. after initializing now its working fine..thanks again for the support.