Hard Fault Exception by build with optimisation
Hello,
I've a project which are build with the STM32CubeIDEA Version 1.16.0. I use the tool chain 11.3.rel1. After build with optimisation -O0 the application works without problems. It is implemented with bare metal and with using of the LL version 1.6.1 for the G0 library.
Now when I build the application with a other optimisation, like -Og, the software runs in a hardfault exception.
After some days, today, I will search for this problem and collect all information. And murphy struck. I can't reproduce this problem.
I remeber me on the following information in the hardfault exeption:
- it was equal which optimisation I used, the behaviour was the same
- the LR register value was 0xfffffff8 in the hardfault exeption handle
- the callstack history show me the same calls
- the last function the the callstack history was a ISR, which IRQ was disabled
So I have here found a other problem https://community.st.com/t5/stm32cubeide-mcus/stm32g0-hardfault-and-signal-handler-fffffff1/m-p/676866 . If this the same problem? My MCU have only one Flash bank but the main loop runs into the RAM for using the performance without wait states from the Flash.
Exists a Errata Sheet to the Bug in the Silicon?
Best regards,
Bernd
