diff --git a/os/rt/ports/ARMCMx/chcore_v7m.c b/os/rt/ports/ARMCMx/chcore_v7m.c index 518d162b9..da9368caa 100644 --- a/os/rt/ports/ARMCMx/chcore_v7m.c +++ b/os/rt/ports/ARMCMx/chcore_v7m.c @@ -64,7 +64,7 @@ void SVC_Handler(void) { #if CORTEX_USE_FPU /* Enforcing unstacking of the FP part of the context.*/ - SCB_FPCCR &= ~FPCCR_LSPACT; + FPU->FPCCR &= ~FPU_FPCCR_LSPACT_Msk; #endif /* The port_extctx structure is pointed by the PSP register.*/ @@ -94,7 +94,7 @@ void PendSV_Handler(void) { #if CORTEX_USE_FPU /* Enforcing unstacking of the FP part of the context.*/ - SCB_FPCCR &= ~FPCCR_LSPACT; + FPU->FPCCR &= ~FPU_FPCCR_LSPACT_Msk; #endif /* The port_extctx structure is pointed by the PSP register.*/