-
Notifications
You must be signed in to change notification settings - Fork 7.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
High IRAM (93.6%) usage in wifi_provisioning component (IDFGH-8550) #10001
Comments
Hello, @gkoumanos The Thank you. |
Thank you @Harshal5 |
|
@gkoumanos Interim, any specific reason you would like to keep your code in IRAM? Given its v4.2 release which is quite old, I do not see any other suggestions that may help here apart from the ones I gave in my earlier comment. |
We request no IRAM usage explicitly. We weren't even aware of this till we had to use the |
Did you try out suggestions from my earlier comment? |
Sorry, I forgot to mention. All your suggestions were previously applied before opening this issue. |
Okay. Can you please share your
Sorry, I am still not quite clear on your requirement. If you have no requirement for explicit IRAM, then even current configuration should work for you, right? Just note that, most of the firmware code lies in flash and executes directly from flash itself. Are you facing any build time issues? If yes, can you please share logs? |
I only used the For your reference here are some of the results of my tests with
Our requirement is to add |
Your analysis looks correct. Unfortunately, there are no additional config option apart from the ones you already tried.
Just to double check, does your code already integrates WiFi/BT libraries before trying to add
|
It does implement WiFi but no BT/BLE.
We have already done that (this is why we raised this issue):
Thank you. We tried these and they do not seem to affect IRAM. It was a wild guess (out of desperation :) ) |
We have on outstanding feature request on this topic at #9824 (please also see #7876 (comment)). Interim, is it possible to share |
@mahavirj I subscribed to #9824 in case it gets updated in the future. |
@gkoumanos You can add me as collaborator on your private repository or you may also directly email me (please look out for address in IDF commit message) |
As discussed offline, we do not see any further optimization scope in IRAM numbers. Adding couple of things that we found for future reference purpose:
I would suggest that we track this issue through #9824 which may further help in this regard. Closing this one. |
On latest master we've added a kconfig option for using parts of SRAM1 as IRAM in 5cbd311 which will help with this issue. We've also focused on reducing IRAM usage/making placement optional for several components. For an full overview of all such option see Optimizing-iram-usage. All new options for saving IRAM we add will be listed in this chapter. |
I usually check this list first https://docs.espressif.com/projects/esp-idf/en/v5.1/esp32s3/api-guides/performance/ram-usage.html. Nowadays, i have need decrease the iram wifi consumption. If you have SPIRAM, you can change in "SPI RAM config" the access method of the spi ram to "CONFIG_SPIRAM_USE_CAPS_ALLOC=y". Then the "Wi-Fi" configuration allows to use "Type of WiFi TX buffers(dynamic)" instead of static ones. In addition you can put "Max number of WiFi static RX buffer" in 2 and "WiFi AMPDU RX BA window size" in 2 too. This steps free 14% iram in my project. |
Answers checklist.
General issue report
We have experienced very high IRAM usage when wifi_provisioning component is used.
ESP-IDF version: v4.2.4
Similar results appear on ESP-IDF 4.2.1 and 5.1.
This leaves no space for our code. Is this normal?
The text was updated successfully, but these errors were encountered: