Skip to content
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

cpu/esp32: place freertos and periph in IRAM #17087

Merged
merged 1 commit into from
Nov 18, 2021

Conversation

gschorcht
Copy link
Contributor

@gschorcht gschorcht commented Oct 30, 2021

Contribution description

This PR moves the code from cpu/esp_common/periph and cpu/esp_common/freertos from IROM to IRAM.

The IRAM is much faster than the IROM. Furthermore, IROM can only be accessed via a cache which is sometimes disabled, e.g. by the WiFi module or when writing to the flash. Therefore, time-critical code as well as code that has to work even when the IROM cache is disabled must be placed in the IRAM.

The PR should increase stability.

Testing procedure

Tests in Murdock should still success.

Additionally, a networking application should be tested.

USEMODULE='esp_wifi' CFLAGS='-DESP_WIFI_SSID=\"ssid\" -DESP_WIFI_PASS=\"pass\"' make -C examples/gnrc_networking BOARD=esp32-wroom-32 flash term

Issues/PRs references

Found when fixing #16281.

The IRAM is much faster, while the IROM is much slower and can only be accessed via a cache, which is also sometimes disabled, e.g. by the WiFi module or when writing to the flash. Therefore, time-critical code as well as code that has to work even when the cache is disabled must be placed in the IRAM.
@github-actions github-actions bot added Area: cpu Area: CPU/MCU ports Platform: ESP Platform: This PR/issue effects ESP-based platforms labels Oct 30, 2021
@gschorcht gschorcht added Area: build system Area: Build system CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR CI: run tests If set, CI server will run tests on hardware for the labeled PR Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation labels Oct 30, 2021
@fjmolinas fjmolinas added this to the Release 2022.01 milestone Nov 18, 2021
@fjmolinas fjmolinas merged commit 691601f into RIOT-OS:master Nov 18, 2021
@gschorcht
Copy link
Contributor Author

Thanks for reviewing and merging.

@gschorcht gschorcht deleted the cpu/esp32/fix_code_placement branch November 18, 2021 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: build system Area: Build system Area: cpu Area: CPU/MCU ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR CI: run tests If set, CI server will run tests on hardware for the labeled PR Platform: ESP Platform: This PR/issue effects ESP-based platforms Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants