cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeIDE: HSI → PLL /2 not honored (Nucleo-F303RE, expected 36 MHz but runs at 72 MHz)

Bhavil
Associate II

Hi Team,

I’m prototyping on a Nucleo-F303RE using STM32CubeIDE. In the clock configuration, I set the system clock to 36 MHz from HSI (HSI → PLL with the /2 divider), as shown in the clock tree screenshot.

 

Bhavil_0-1756452511992.png

However, my firmware misbehaved. After debugging, I found that SystemClock_Config() function isn’t applying the HSI/2 divider when feeding the PLL. Instead of:

  RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;

CubeIDE generates:

  RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI_DIV2;

 

This effectively makes the system clock 72 MHz instead of the configured 36 MHz.

Did I misconfigure something in the clock setup, or is this a CubeIDE code-generation bug when using HSI with the PLL /2 divider?

1 REPLY 1
Souhaib MAZHOUD
ST Employee

Hello @Bhavil 

What is the version of the firmware and STM32CubeIDE used? 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.