Skip to main content
lastMcu
Associate II
July 17, 2024
Solved

HSE with PLL for STM32WB at 64MHZ

  • July 17, 2024
  • 1 reply
  • 1969 views

There doesn't seem to be any project in the whole STM32CubeWB package that uses the HSE with PLL. At least I couldn't find any with a .IOC file. Most samples in the package use the MSI clock, except, of course, for the wireless projects that use HSE for better accuracy. But in all those projects that use the HSE, they use the clock directly, not through the PLL, and then they clock the main CPU at 32 MHz, not at 64 MHz.

 

Of course it is possible to modify the configuration to use the HSE with the PLL. But it is rather strange that with all the projects in the package, everyone that do use the HSE, doesn't use the PLL and chooses to configure the CPU at a lower frequency. To be honest, it makes one suspicious that it could be a problem and it might not work reliably if one try to use the HSE with the PLL.

 

Anybody has any actual experience with a wireless project using the HSE and clocking the CPU at 64 MHz through the PLL?

 

Thanks

Best answer by STTwo-32

I can't see any potential problem in running the STM32WB with a HSE PLL frequency of 64 MHz. It should work fine.

Best Regards.

STTwo-32 

1 reply

Remy ISSALYS
Technical Moderator
July 19, 2024

Hello,

You can find BLE_HeartRate_PLL example in STM32CubeWB package witch used the PLL as system clock.

Best Regards

lastMcu
lastMcuAuthor
Associate II
July 20, 2024

@Remy ISSALYS wrote:

You can find BLE_HeartRate_PLL example in STM32CubeWB package witch used the PLL as system clock.

Are you sure it uses the PLL as system clock? I can see that the PLL is configured to use HSE. But I don't see that the PLL is connected to the system clock:

 

 RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_HSE;
 ...
 if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_1) != HAL_OK)

 

As you can see, HSE is connected to the system clock directly, not through the PLL. Also, the configured flash latency would be too low for a 64 MHz clock.

STTwo-32
Technical Moderator
July 23, 2024