AnsweredAssumed Answered

HSE code generation not working

Question asked by nunes.pedro.003 on May 28, 2015
Using STM32CubeMX to generate code for STM32F427ZITx processor. When changing the clock source from HSI to HSE the generated code updates the PLL fields but still maintains the source of the clock as HSI as shown below.

 RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;
  RCC_OscInitStruct.HSIState = RCC_HSI_ON;
  RCC_OscInitStruct.HSICalibrationValue = 16;
  RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
  RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
  RCC_OscInitStruct.PLL.PLLM = 8;
  RCC_OscInitStruct.PLL.PLLN = 336;
  RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2;
  RCC_OscInitStruct.PLL.PLLQ = 7;
  HAL_RCC_OscConfig(&RCC_OscInitStruct);

I'm assuming this is a bug in the tool. Is there a fix? I have rewritten the code by hand but it would be awesome if this got fixed in the tool.

Outcomes