cancel
Showing results for 
Search instead for 
Did you mean: 

How to configure 96 Mhz clock for application in STM32WBA55CG

BKaiwalya
Associate II

Hi,

I am programming the nucleo_wba55cg using Zephyr v3.7.0.

My application is based on a BLE peripheral example, whereby I have also configured an LED on the nucleo_wba55cg board to toggles at the rate of 1s.

Also, I modified the rcc section the nucleo_wba55cg.dts file to adapt to the higher system clock (96 MHz, similar to that of the nucleo_wba52cg) shown below:

 

&pll1 {
div-m = <8>;
mul-n = <48>;
div-q = <2>;
div-r = <2>;
clocks = <&clk_hse>;
status = "okay";
};

&rcc {
clocks = <&pll1>;
clock-frequency = <DT_FREQ_M(96)>;
ahb-prescaler = <1>;
ahb5-prescaler = <4>;
apb1-prescaler = <1>;
apb2-prescaler = <1>;
apb7-prescaler = <1>;
};

 

 
 
Expectation: while the BLE application is active, LED blinks at a frequency of 16 MHz (6 times slower so it toggles every 6 seconds as opposed to the 1 sec as configured in the application).
 
Later, I modified the application via SCM (https://wiki.st.com/stm32mcu/wiki/Connectivity:STM32CubeWBA_System_Clock_Manager#SCM_USERS_TABLE) to a higher clock (32 MHz) and added this function to the main.c file of my application. This resulted that the LED now blinks faster, where it toggles every 3 seconds.

 

main.c

scm_setsystemclock(SCM_USER_APP, HSE_32MHZ);

 

 

Could you please let me know how to correct this behavior and achieve the correct blinking pattern of the LED (1 seconds). In case this involves PLL settings, how to do it?

 

 

1 REPLY 1
SofLit
ST Employee

Hello,

A simulation done on CubeMx:

SofLit_0-1731593787661.png

 

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.