alt.hn

4/17/2026 at 10:32:49 AM

Floating Point Fun on Cortex-M Processors

https://danielmangum.com/posts/floating-point-cortex-m/

by hasheddan

4/18/2026 at 9:37:35 PM

Interesting. I was just thinking about this because of another post on floating point. I'm wondering if I can disable the fpu every so often and turn it on only if code needs it and it raises an exception.

by Neywiny

4/19/2026 at 4:20:48 AM

It's unclear why one would ever need to do this. Is it for power savings? What other use-cases would benefit from turning the FPU off between instructions?

by glitchc

4/19/2026 at 11:52:54 AM

Yes, for power savings. But I'd need to do a bit of a study on my code to see if it's even worth it. Since the majority of it doesn't use the FPU, it could help. But it might not be worth the effort.

by Neywiny

4/19/2026 at 3:09:47 AM

Yes, you could turn it off every context switch.

by bobmcnamara

4/19/2026 at 2:39:32 AM

Zephyr support lazy FPU context switches. So the downside from enabling FPU sharing is fairly limited.

by summa_tech