Stack corruption on first FPU access after starting application from SBSFU
I have an issue with stack corruption on the first FPU access (specifically vmov instruction) after jumping to the application code from SBSFU. I noticed that when the application starts the LSPACT bit is set in FPCCR register. Clearing the bit in startup code (in application) fixes the stack corruption and application starts correctly.
My questions are:
- is this correct fix for the issue?
- SystemInit function enables the FPU. Should it also do some other initialization for it (like clearing the aforementioned bit)?
- should SBSFU do something to the FPU configuration before jumping to the application?
I'm using STM32H7 MCU. SBSFU is based on an example project from SBSFU package. Application uses standard startup code from STM32Cube
