-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
ESP32 Core v2.0.1 / 2.0.1 RC1 crashes if using float in ISR #5892
Comments
There is few topics on forum about this and it is not arduino related. Here is just few: |
Thanks @chegewara. I'll use double instead. |
A bug? optimization? |
I don't believe in luck at all. But we have to accept the reality that some mods in esp-idf (and/or core v2.0.0+) disrupted the float usage in ISR. Good to know. Thanks anyway, |
there was something we had to do to get it working. I'll ask around to see if anyone has a clue what was the fix. |
Thanks, There is a possible link here |
@khoih-prog I will turn on that option and soon have it in master branch for the next release :) |
@khoih-prog Do you have a C3/S2 that you can test your minimal sketch with to confirm if they crash similarly? @me-no-dev that flag appears to be ESP32 specific so it may introduce discrepancy between platform support. |
The ESP32 C3/S2 are single core, so they don't crash as this happens only to dual-core ESP32
This mod will crash ESP32 immediately while OK with ESP32_S2. Somehow, ESP32_S2 can't use the minimal sketch code
|
Note that using floats in ISRs shouldn't be a problem on S2 or C3 because neither have a hardware floating point unit. However this might be an issue on the ESP32-S3 (same way as it is an issue on the ESP32). |
Merged in master :) |
Core ESP32 Core v2.0.1 / 2.0.0 crashes if using float inside ISR. No issue with core v2.0.0-
This creates issue with some ESP32 TimerInterrupt-related libraries, such as mentioned in ESP32_New_TimerInterrupt Important Notes
With the following simple sketch, it's working OK if using
but crashes if using
Minimal, Reproducible Example (MRE) sketch
Debug Output if not using
float
Debug Output if using
float
Exception Decoder
The text was updated successfully, but these errors were encountered: