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

Fix esp32 multicore lockup #2916

Merged
merged 2 commits into from
Nov 26, 2024
Merged

Conversation

mikee47
Copy link
Contributor

@mikee47 mikee47 commented Nov 25, 2024

This PR fixes the broken IPC calling interrupts on esp32 chips. Closes #2653.

Cause is due to an incorrect linker flag which resulted in critical high-level interrupt handling code from the ESP IDF not getting linked.

Testing also revealed a race condition during access point initialisation. The Basic_Wifi sample first initialises the access point, then the station. Shortly after startup, some internal structure for the access point gets invalidated and causes an access violation. It appears to be related to calling esp_wifi_start twice.

@mikee47
Copy link
Contributor Author

mikee47 commented Nov 25, 2024

We could revert #2696 so that multicore devices have both cores available by default... though I'm inclined to leave it alone for now.

@slaff slaff added this to the 6.0.0 milestone Nov 25, 2024
@mikee47 mikee47 marked this pull request as draft November 25, 2024 14:20
@mikee47 mikee47 force-pushed the fix/esp32-multicore-lockup branch from 361f856 to 20e1588 Compare November 25, 2024 16:17
@SmingHub SmingHub deleted a comment from what-the-diff bot Nov 25, 2024
@mikee47 mikee47 marked this pull request as ready for review November 25, 2024 16:19
With Basic_WiFi sample, system crashes in multicore.
If station is initialised *before* access point, this doesn't happen.
Deferring the call to `esp_wifi_start` fixes the issue.
@mikee47 mikee47 force-pushed the fix/esp32-multicore-lockup branch from 20e1588 to 8e93a18 Compare November 25, 2024 16:21
@slaff
Copy link
Contributor

slaff commented Nov 26, 2024

@mikee47 ready with this PR?

@mikee47
Copy link
Contributor Author

mikee47 commented Nov 26, 2024

Yes, thanks.

@slaff slaff merged commit 7b3ef4f into SmingHub:develop Nov 26, 2024
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ESP32, IDF 5.0: error with nvs_flash_init
2 participants