AnsweredAssumed Answered

STM32CubeMX Generating Incorrect Code for Clock Configuration

Question asked by Terence D on Sep 27, 2017
Latest reply on Feb 6, 2018 by Terence D

I've used the STM32CubeMX application to setup the main PLL and PLLI2S as shown below:

 

 

When I generate the code, it generates the following:


PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_I2S;
PeriphClkInitStruct.PLLI2S.PLLI2SN = 123;
PeriphClkInitStruct.PLLI2S.PLLI2SM = 8;   // <--- Compilation failure, PLLI2SM is not structure element
PeriphClkInitStruct.PLLI2S.PLLI2SR = 5;
PeriphClkInitStruct.I2SClockSelection = I2S_CLOCK_PLL;  // <-- I2SClockSelection is not a struct element
if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK)
{
_Error_Handler(__FILE__, __LINE__);
}

 

As shown in the comments in the code above, both PLLI2SM and I2SClockSelection are not members of their respective structures.  This results in a compilation failure...  Anyone know what's going on here?

Outcomes