WiFi TX static buffers error

kasper
Posts: 14
Joined: Thu Mar 03, 2022 9:53 am

WiFi TX static buffers error

Postby kasper » Fri Jun 10, 2022 7:51 am

Hi,

I'm trying to allocate as much static buffer as possible for the WiFi TX module.

In menuconfig the maximum number of buffers should be 64, but if I'm allocating more than 32 (e.g. 33), the esp crashes when booting:

Code: Select all

ESP_ERROR_CHECK failed: esp_err_t 0x101 (ESP_ERR_NO_MEM) at 0x4038017c
I'm using the ESP32-S3, and have tried both with and without PSRAM.

Is it possible to allocate more than 32 static buffers for WiFi TX module?

please see this thread for more context: https://www.esp32.com/viewtopic.php?f=13&t=27665

Thanks
Kasper Nyhus
Bang & Olufsen

kasper
Posts: 14
Joined: Thu Mar 03, 2022 9:53 am

Re: WiFi TX static buffers error

Postby kasper » Mon Jun 20, 2022 6:19 pm

No one who have tried to allocate more than 32 static buffers to the WiFi module?

Thanks,
Kasper Nyhus
Bang & Olufsen

boarchuz
Posts: 606
Joined: Tue Aug 21, 2018 5:28 am

Re: WiFi TX static buffers error

Postby boarchuz » Tue Jun 21, 2022 4:26 pm

The more static WiFi buffers you have, the less heap memory is available, the more likely the allocation failure you're seeing.

The configuration option isn't aware of how much memory you'll actually have available - every application is different - so the maximum (64) might not be possible in your particular scenario.

You will need to reduce memory used elsewhere (or put things in PSRAM where possible) if you want to free up some memory for more static WiFi buffers.

kasper
Posts: 14
Joined: Thu Mar 03, 2022 9:53 am

Re: WiFi TX static buffers error

Postby kasper » Wed Jun 22, 2022 7:11 am

Thanks boarchuz,

sure its eating at my available heap, but the thing is that I can never go beyond 32 buffers, even if my application dosen't do anything else, and even with 8MB of PSRAM available

thanks
Kasper Nyhus
Bang & Olufsen

boarchuz
Posts: 606
Joined: Tue Aug 21, 2018 5:28 am

Re: WiFi TX static buffers error

Postby boarchuz » Wed Jun 22, 2022 9:21 am

I tried it myself with both ESP32 and S3, and you're right - they return ESP_ERR_NO_MEM even though all heap_caps_get_x() functions report plenty being available. Seems that either the config option should be capped to 32 if there's some reason for the limitation or there's a bug in WiFi initialisation. It might be worth creating an issue on GitHub.

kasper
Posts: 14
Joined: Thu Mar 03, 2022 9:53 am

Re: WiFi TX static buffers error

Postby kasper » Thu Jun 23, 2022 9:11 am

Perfect, I have opened an issue

https://github.com/espressif/esp-idf/issues/9217

thanks
Kasper Nyhus
Bang & Olufsen

Who is online

Users browsing this forum: Google [Bot] and 184 guests