Forced to use static wifi buffers together with SRAM even though PSRAM couldn't be detected

persan666
Posts: 28
Joined: Fri Feb 16, 2018 9:17 am

Forced to use static wifi buffers together with SRAM even though PSRAM couldn't be detected

Postby persan666 » Fri Jan 22, 2021 9:32 am

Hi,

I have two generation of products using different ESP chips but with the same application.
First generation is using the ESP-WROOM-32 chip and the second generation is using the ESP32-WROVER-B.
The second generation product make use of the included PSRAM.

To the problem: When activating PSRAM you are forced to use static wifi buffers. This is okey when you have a chip with PSRAM.
In our case we have one product that do not have the PSRAM an therefor we use the option SPIRAM_IGNORE_NOTFOUND.
Even thoug the PSRAM cannot be found it uses static wifi buffers causing the system to allocate ~100Kbytes ram when calling

Code: Select all

esp_wifi_init()
Is it possible to have static wifi buffer when running a chip with PSRAM and dynamic buffer when PSRAM couldn't be detected?

Note: There also seems to be a bug when using SPIRAM_IGNORE_NOTFOUND together with chips not having the PSRAM. Therefor I have temporarly maked a workaround using the suggestionfrom here but slightlly different:
https://github.com/espressif/esp-idf/issues/6063

Code: Select all

	
if (s_spiram_okay) {
	esp_spiram_init_cache();
}


- Module or chip used: ESP32-WROVER-B and ESP-WROOM-32
- IDF version: v4.2-238-g8cd16b60f
- Build System: CMake
- Compiler version: xtensa-esp32-elf-gcc (crosstool-NG esp-2020r3) 8.4.0
- Operating System: Windows
- (Windows only) environment type: ESP Command Prompt
- Using an IDE?: Eclips 2020-09 (4.17.0)
- Power Supply: Battery

Who is online

Users browsing this forum: No registered users and 367 guests