-
Notifications
You must be signed in to change notification settings - Fork 264
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 restoring of CPENABLE #2315
Conversation
@@ -254,7 +284,7 @@ generic-queue = [ | |||
integrated-timers = [ | |||
"esp-hal-embassy/integrated-timers", | |||
] | |||
octal-psram = ["esp-hal/octal-psram", "dep:esp-alloc"] | |||
octal-psram = ["esp-hal/octal-psram", "esp-alloc"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dep:
meant there was no implicit esp-alloc
feature, which I need in the new test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Nice you were able to create a test for this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I tried using this in my project where I was running into this and it now works correctly without the float-save-restore
feature enabled 🎉
esp-wifi did not save the CPENABLE state, which sometimes resulted in the FPU being turned off. This can happen if esp-wifi decides to switch context in a lower-priority ISR, without
float-save-restore
being enabled.The original issue is tricky to reproduce because previously we didn't change the word in the stack frame at all, so esp-wifi "restored" what was there before.
With
float-save-restore
this issue shouldn't happen since we don't disable the FPU.