2017-03-26 04:42 PM
Possible bug in CubeMX 4.20.0?
Using Nucleo 303ZE board, and Atollic 7.1.1
Build dead simple default project, except in RCC, set High Speed Clock to 'BYPASS Clock Source', and select HSE as input to PLL.
In main.c you'll have this routine:
void SystemClock_Config(void)
{RCC_OscInitTypeDef RCC_OscInitStruct;
RCC_ClkInitTypeDef RCC_ClkInitStruct;/**Initializes the CPU, AHB and APB busses clocks
*/ RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI|RCC_OSCILLATORTYPE_HSE; RCC_OscInitStruct.HSEState = RCC_HSE_BYPASS; RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE; RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL2; RCC_OscInitStruct.PLL.PREDIV = RCC_PREDIV_DIV1; if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) { Error_Handler(); },,, etc,
Results in bad return from HAL_RCC_OscConfig() and call to Error_Handler().
If you change this line:
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI|RCC_OSCILLATORTYPE_HSE;
to
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;
it runs fine.
Not sure if there is something I don't understand, or if it is possibly a bug in CubeMX. my .ioc file attached.
Solved! Go to Solution.
2017-04-28 12:38 AM
Hi
Lukis.Larry
,
I would inform you that anew patch
V 4.1is available to fix this issue.Sorry for any inconvenience this may cause you.
BR. Eric
2017-03-27 03:43 AM
Hi
larry.lukis
,Please note that this is a confirmed CubeMX bug whichwill be fixed in a patch to be delivered soon.
Sorry for anyinconvenience it may bring.
-Nesrine-
2017-04-28 12:38 AM
Hi
Lukis.Larry
,
I would inform you that anew patch
V 4.1is available to fix this issue.Sorry for any inconvenience this may cause you.
BR. Eric