STM32CubeMX V6.6.1 HAL driver crashes, LL interface works
This is my first STM32 project and I am using an STM32F030C6T as a MODBUS slave device. I used the STM32CubeMX V6.6.1 to create a project template and STM32CubeIDE Version: 1.10.1 Build: 12716_20220707_0928 (UTC), along with an STlink interface.
When I build the MX project using HAL driver under project settings/advanced the project builds correctly but when I download into the target device it crashes as soon as it tries to initialise the USART and other devices. If I comment those drivers out so only the GPIO is initialised I can get the GPIO to run for a very short time before in triggers the HardFault interrupt.
If I rebuild the project and change to using the LL driver interface, the code builds and downloads and runs without issues. I can then add my 5 lines of code for a blinky light.
Seems to be an issue with the HAL setup or my environment, any suggestions welcome.
Footprint for the LL interface is
HAL footprint
