Page 1 of 1

Floating point in ISR?

Posted: Fri Dec 30, 2016 7:24 pm
by cmason
Is use of floating point instructions disallowed in interrupt routines?



Re: Floating point in ISR?

Posted: Mon Jan 02, 2017 2:03 pm
by ESP_Sprite
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.