cancel
Showing results for 
Search instead for 
Did you mean: 

Using FPU in ISR and main() Code

pranjalk197
Associate II

I want to use the FPU in an ISR. Will I have context switching issues or i have to specifically make changes in the System_stmxx.c if i am using code generated from CubeIDE.

Do i need to setup these registers explicitly or it is handled by CubeIDE by default? (i didn't found these bits explicitly setup in System_stmxxx.c )

 FPU->FPCCR |= (FPU_FPCCR_ASPEN_Msk | FPU_FPCCR_LSPEN_Msk);
This code sets the ASPEN (Automatic State Preservation Enable) and LSPEN (Lazy State Preservation Enable) bits, ensuring that the FPU context is handled appropriately during interrupts.

MCU: STM32H723ZGT6
CubeIDE Ver: 1.16.0
0 REPLIES 0