Skip to main content
DS.4
Senior
Apr 28, 2025 7:16 AM UTC
Solved

BLE sleep advertising at fast rate of 1 or 2 ms

Got this issue on entering sleep.

 

I set my advertising to 1 second, and do not touch it after.

 

Before sleep, all was good,  I was advertising every ~1 second

 

but when I enter sleep I notice it jumps to 1 or 2 ms.. very fast, and not so power consuming.

 

I didn't test with power testing tool, to validate the peaks, but only via the phone app.

 

Wonder what might be causing this?? Do I accidently shutdown some peripheral important for BLE?

 

 

This topic has been closed for replies.
DS.4
DS.4Best answer
Senior
Jun 4, 2025 2:20 PM UTC

 

I followed the PLL example I think BLE_HearRate_PLL and that helped.

 

One of the clocks was misconfigured.

5 replies

FilipKremen
ST Employee
Apr 30, 2025 11:21 AM UTC

Hello,

can you please describe the issue more in detail? Can you show any waveform?

Also, if you could share the steps when you're testing it, so I could reproduce it on my side.

Thank you.

 

Best regards,

ST support

DS.4
DS.4Author
Senior
May 11, 2025 7:03 AM UTC

We are currently trying to get our hands on a better sniffing tool, but this might take some time..

 

Meanwhile,  did manage to improve it slightly by following the free rtos example with ble.

 

BTW, I am on stack 21 .

 

Now, I see a drop from 1 sec ( initial pre sleep setting ) to around 200-250 ms during sleep.

 

Any idea to why do I get this drop? Any debug I can add to BLE stack? Anything you know of that might be causing this ? 

 

I did follow the example as much as possible. HAL, RTC, CLOCKS.. ( FreeRTOS BleHeartRate)

 

We use a slightly different operating system, a CMSIS one.

 

Do you guys have a CMSIS RTOS sleep example?

 

 

 

 

FilipKremen
ST Employee
May 12, 2025 2:14 PM UTC

Hello,

which board do you use? Is it a custom board? You can enable debug traces in the app_conf.h file.

Can you please share the measurement? Thank you.

Unfortunately, there is no CMSIS RTOS sleep example in the WB package.

 

Best regards,

ST support

 

DS.4
DS.4Author
Senior
May 12, 2025 6:39 PM UTC

@FilipKremen

 

As soon as we hit EnterLowPower() , out advertising goes crazy ( 1- 2 ms ) 

 

This pretty sure is caused because we use PLL's in SystemClock_Config .

 

They are used also for our :ADC , RTC. 

 

(Although that's not the config you guys use in your example)

 

After turning PLL off , no issue !

 

BUT WHY? 

and is there any way we don't have to make grand changes in our clocks to fix this?

 



.

 

DS.4
DS.4AuthorBest answer
Senior
Jun 4, 2025 2:20 PM UTC

 

I followed the PLL example I think BLE_HearRate_PLL and that helped.

 

One of the clocks was misconfigured.