I am using STM32CubeMX 4.22.0
I am using STM32F103C8T6 chip with Keil v5 under Windows 10.
I configured only RCC to HSE for Crystal\Ceramic Resonator and in Clock Configuration input frequency to 8 MHz and HCLK to 72MHz .I generated the code for keil, but at the function "SystemClock_Config()" the chip falls into Error_Handler().
following code was generated:
/**Initializes the CPU, AHB and APB busses clocks
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;
RCC_OscInitStruct.HSEState = RCC_HSE_ON;
RCC_OscInitStruct.HSEPredivValue = RCC_HSE_PREDIV_DIV1;
RCC_OscInitStruct.HSIState = RCC_HSI_ON;
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;
RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL9;
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
I debug step by step. At the point "Error_Handler" the program goes in to infinite loop of function "Error_Handler(char * file, int line) " I can not understand what is the problem. I also attached the full project at the attachment.