ESP32 reboots regularly within 20 minutes

buddhika
Posts: 12
Joined: Tue Sep 20, 2022 8:14 am

ESP32 reboots regularly within 20 minutes

Postby buddhika » Tue Nov 29, 2022 4:55 am

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

ESP_Sprite
Posts: 9729
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32 reboots regularly within 20 minutes

Postby ESP_Sprite » Tue Nov 29, 2022 5:42 am

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.

buddhika
Posts: 12
Joined: Tue Sep 20, 2022 8:14 am

Re: ESP32 reboots regularly within 20 minutes

Postby buddhika » Tue Nov 29, 2022 5:52 am

Dear ESP_SPRITE,
how can I identify a memory leak

ESP_Sprite
Posts: 9729
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32 reboots regularly within 20 minutes

Postby ESP_Sprite » Tue Nov 29, 2022 8:01 am

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.

buddhika
Posts: 12
Joined: Tue Sep 20, 2022 8:14 am

Re: ESP32 reboots regularly within 20 minutes

Postby buddhika » Tue Nov 29, 2022 10:54 am

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.

Who is online

Users browsing this forum: Jorgie and 87 guests