Is use of floating point instructions disallowed in interrupt routines?
Thanks,
-c
Floating point in ISR?
-
- Posts: 9708
- Joined: Thu Nov 26, 2015 4:08 am
Re: Floating point in ISR?
It's not a good idea, no. The floating point registers aren't saved on ISR entry, so using floats in an interrupt means that the fpu registers as used by the currently running thread are corrupted. If there's no such thread, I'm not exactly sure what happens, but my guess would be a coprocessor exception resulting in a panic.
We're aware of this restriction, we're brooding on a nice way to fix it in the future, but for now, please do not use floating point stuff in ISRs.
We're aware of this restriction, we're brooding on a nice way to fix it in the future, but for now, please do not use floating point stuff in ISRs.
-
- Posts: 4
- Joined: Wed Jul 07, 2021 11:09 am
Re: Floating point in ISR?
Is it already possible to use floating point in ISR? It's been 4 years since the creation of this topic and I still have this restriction on my esp-wroom-32d.
-
- Posts: 9708
- Joined: Thu Nov 26, 2015 4:08 am
Re: Floating point in ISR?
There's an option in menuconfig now to enable the FPU inside an ISR (ref)
Who is online
Users browsing this forum: Gaston1980, Google [Bot] and 109 guests