RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI|RCC_OSCILLATORTYPE_HSE; RCC_OscInitStruct.HSEState = RCC_HSE_ON; RCC_OscInitStruct.HSEPredivValue = RCC_HSE_PREDIV_DIV1; 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) { Error_Handler(); } 板子上运行标准库的程序可以运行 |
问题解决了, RCC_OscInitStruct.OscillatorType =RCC_OSCILLATORTYPE_HSI|RCC_OSCILLATORTYPE_HSE;
去掉RCC_OSCILLATORTYPE_HSI这个就可以了,我也是看到别人遇到同样的问题这样解决了,试了下,程序运行了,可能新的CubeMX真有这个BUG