Open fuzeman opened 2 days ago
Looking at other similar issues, there was a suggestion in https://github.com/espressif/esp-idf/issues/11615#issuecomment-1612718659 to log the result of esp_get_free_internal_heap_size
inside malloc_internal_wrapper
to confirm memory usage. Which was added as follows:
void *IRAM_ATTR esp_coex_common_malloc_internal_wrapper(size_t size)
{
void * result = heap_caps_malloc(size, MALLOC_CAP_8BIT | MALLOC_CAP_DMA | MALLOC_CAP_INTERNAL);
printf("m.%d\n", esp_get_free_internal_heap_size());
fflush(stdout);
return result;
}
This provides the following results which show free memory usage stabilizing to ~252 KB:
[...]
W (46481) wifi:m f null
m.252848
m.253032
m.253032
m.252848
W (46481) wifi:m f null
m.252848
m.252848
m.252848
m.252848
m.252848
m.252848
W (46491) wifi:m f null
m.252848
m.252848
m.252848
W (46491) wifi:m f null
m.252848
m.252848
m.252848
m.252848
m.252848
m.252848
W (46501) wifi:m f null
m.252848
m.252848
m.252848
m.252848
m.252848
W (46511) wifi:m f null
m.252848
m.252848
m.252848
W (46511) wifi:m f null
m.252848
m.252848
m.252848
m.252848
W (46521) wifi:m f null
[...]
Answers checklist.
IDF version.
v5.3.1
Espressif SoC revision.
ESP32-C6 (QFN40) (revision v0.0)
Operating System used.
Windows
How did you build your project?
Command line with idf.py
If you are using Windows, please specify command line type.
CMD
Development Kit.
ESP32-C6-DevKitC-1
Power Supply used.
USB
What is the expected behavior?
WiFi Station connects to an Access Point and continues operating normally without errors.
What is the actual behavior?
WiFi Station connects to an Access Point, receives an IP Address , and after a 30 seconds starts logging "wifi:m f null" continuously blocking other tasks from operating.
Steps to reproduce.
examples/wifi/getting_started/station
with ssid + password, and upload to board.wifi:m f null
to start being printed.Debug Logs.
More Information.
I've tested various wifi configurations and versions of esp-idf to narrow down this issue and discovered
esp_wifi_set_ps
may have some impact on this issue, with esp-idf <= 5.2.1 working as long asWIFI_PS_MIN_MODEM
orWIFI_PS_MAX_MODEM
is used.Noticeably esp-idf v5.3+ has a longer delay (30 seconds) before this issue presents allowing STA_GOT_IP to be emitted, but
esp_wifi_set_ps
has no effect with all power saving modes eventually returning the samewifi:m f null
errors.(m f null, wdt)
(m f null, wdt)
(m f null, wdt)
(m f null, wdt)
(m f null, wdt)
(m f null, wdt)
(m f null, wdt)
(m f null, wdt)
(m f null, wdt)
(m f null, wdt)
(m f null, wdt)
12488, #12464, #11615 report similar
wifi:m f null
issues, but all appear to have fixes implemented or were caused by memory exhaustion outside of the esp-idf framework.