I have been experimenting with my NUCLEO-L476RG
I have generated some code with CubeMX for SW4STM32 and I am getting some problems with the code, ending up in an Error Handler sometimes (in main):
void _Error_Handler(char * file, int line)
/* USER CODE BEGIN Error_Handler_Debug */
/* User can add his own implementation to report the HAL error return state */
/* USER CODE END Error_Handler_Debug */
This happens when I do the following:
Use the main clock source for the PLL as HSI, and tick the option "generate peripheral initialization as a pair of '.c/'h' files per peripheral", which I prefer to keep things tidy, in CubeMX.
If I use the MSI instead of the HSI, I don't get this problem.
I am attaching my project for your perusal. Is this a known bug? Or am I missing something?