cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMX 4.25 STM32L433RCTx SystemClock_Config Bug PLLM

H. K.
Associate
Posted on April 11, 2018 at 11:48

Hi guys.

I'm working in a STM32L433RCTP based project.

The code generated by the Stm32CubeMX for clock configuration has no value set for the PLL-M prescaler in the  PLL struct, see original code:

----------------------------------

/**Initializes the CPU, AHB and APB busses clocks

*/

RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI48|RCC_OSCILLATORTYPE_HSE;

RCC_OscInitStruct.HSEState = RCC_HSE_ON;

RCC_OscInitStruct.HSI48State = RCC_HSI48_ON;

RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;

RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;

RCC_OscInitStruct.PLL.PLLN = 10;

RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV7;

RCC_OscInitStruct.PLL.PLLQ = RCC_PLLQ_DIV2;

RCC_OscInitStruct.PLL.PLLR = RCC_PLLR_DIV2;

if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)

{

_Error_Handler(__FILE__, __LINE__);

}

----------------------------------

I fixed it, by adding the folowing line:

RCC_OscInitStruct.PLL.PLLM = 1;

Even with PLLM prescalers set with different values than 1, CubeMX will forget to add the line.

If I don't add the line, the program freezes at the function call of  HAL_RCC_OscConfig(..).

The bug seems to be occured in a different configuration in the past, too, see:

https://community.st.com/0D50X00009Xkh6lSAB

 

https://community.st.com/0D50X00009XkXG9SAN

 

#system_clock #cubemx-v4.25.0 #systemclock_config #stm32l433rctx
7 REPLIES 7
Markus Schwarzl
Associate III
Posted on April 12, 2018 at 09:31

We have the same issue with the same workaround here in our project for an STM32L0...

Please fix that!

Mark Shoe
Senior
Posted on April 12, 2018 at 09:44

Same problem with the STM32L452

Imen.D
ST Employee
Posted on April 12, 2018 at 09:55

Hello,

We 

confirm that PLLM parameter 

is no more generate for STM32L4 in the CubeMX 

version 4.25

.

T

his bug passed internally to CubeMx team for fix in coming release.

Sorry for such inconvenience.

Best Regards,

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
Houda GHABRI
ST Employee
Posted on April 12, 2018 at 10:50

Hello H.K,

Thanks for your feedback.

The issue will be fixed next CubeMX release.

Please feel free to contact me for further details.

Best regards,

Houda

Posted on April 12, 2018 at 09:57

Hello

Schwarzl.Markus

,

Could you please confirm that you reproduced this issue with STM32L0 using the last CubeMx version 4.

Otherwise, please share your ioc for more check from our CubeMX team.

Best Regards,

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
Posted on April 12, 2018 at 10:00

Hi Imen,

sorry, this was a typo on my side! It is an STM32L476G!

Thanks,

Markus

Nawres GHARBI
ST Employee
Posted on May 03, 2018 at 16:52

4.25.1 fixing this issue will be available by the end of this week