cancel
Showing results for 
Search instead for 
Did you mean: 

STM32WBA52CGU6 System-Clock-Source auto-change upon any BLE api calls

rajdeep_01
Associate III

Hi,

- MCU: STM32WBA52CGU6
- SDK: 1.1.1
- Configured SYSCLK: PLLCLK: 70 MHz

 

- Issue: System-Clock-Source auto-change to HSE, upon any BLE related API calls such as  start BLE advertisement related API aci_gap_update_adv_data().

- Issue is repeatable.

- Issue is hardware independent as verified with different custom  boards and two NUCLEO-STM32WBA52 boards.

- Observed that upon ble_init or BLE related API call, SFR RCC_CFGR1: Bits 3:2 SWS[1:0]: system clock switch status:
Before BLE call: 11: pll1rclk used as system clock
After BLE call: 10: HSE32 or HSE32/2, as defined by HSEPRE, used as system clock.
- For reference attached configuration snapshot:

rajdeep_01_0-1736500139434.png

- Note that upon reconfigure system clock source by API: SystemClock_Config();
  Make PLLCLK as SYSCLK till the time BLE related API not call.

- Request to provide solution/workaround for same.

Thanks

 

1 REPLY 1
STTwo-32
ST Employee

Hello @rajdeep_01 

Infact after starting the BLE on your application, the system clock manager (SCM) is the module that manages the CPU system clock source and frequency. So, in your case, it should be the SCM that always set the system clock source to HSE as you said. To set it to PLL as on your request, you need to call "scm_setsystemclock( SCM user that requests the change, SYS_PLL);" just after configuring the PLL mode and parameters through "scm_pll_setconfig(const scm_pll_config_t *p_pll_config);". More helpful details are available in the wiki:

STM32CubeWBA: System Clock Manager - stm32mcu.

Best Regards.

STTwo-32

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.