diff --git a/arch/arm/src/armv8-m/arm_doirq.c b/arch/arm/src/armv8-m/arm_doirq.c index 0f3fad50bbe..469251a09ad 100644 --- a/arch/arm/src/armv8-m/arm_doirq.c +++ b/arch/arm/src/armv8-m/arm_doirq.c @@ -36,6 +36,7 @@ #include "arm_internal.h" #include "exc_return.h" #include "nvic.h" +#include "psr.h" /**************************************************************************** * Public Functions @@ -45,6 +46,16 @@ void exception_direct(void) { int irq = getipsr(); +#ifdef CONFIG_ARCH_FPU + __asm__ __volatile__ + ( + "mov r0, %0\n" + "vmsr fpscr, r0\n" + : + : "i" (ARMV8M_FPSCR_LTPSIZE_NONE) + ); +#endif + arm_ack_irq(irq); irq_dispatch(irq, NULL);