2024-08-10 02:17 AM - edited 2024-08-10 02:19 AM
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 )
Solved! Go to Solution.
2024-08-10 07:06 AM
Those two bits are set by default, so no explicit setup is needed.
There are no other issues or special considerations you need to make to get this to work. When the first FPU instruction is used within an ISR, the FPU registers are pushed onto the stack. This is handled by the core. You'll lose some cpu cycles due to this, but the program will function as intended.
2024-08-10 07:06 AM
Those two bits are set by default, so no explicit setup is needed.
There are no other issues or special considerations you need to make to get this to work. When the first FPU instruction is used within an ISR, the FPU registers are pushed onto the stack. This is handled by the core. You'll lose some cpu cycles due to this, but the program will function as intended.