cancel
Showing results for 
Search instead for 
Did you mean: 

BLE Advertising not working in STOP2

KRea.1
Associate

I am tying to develop an application in Zephyr for a battery powered device that goes into STOP2 mode for low power consumption when advertising. I have successfully created a test app with STMCube based on the health thermometer example which does this successfully. When in STOP2 mode the current consumption between advertisements is <6uA, with current peaks of up to 20 mA at the advertisement frequency of around 1.5 seconds.

I have copied verbatim the code that enters and exits STOP2 mode my Zephyr project which has the STMCube libraries as part of it's distribution, and am able to replicate the same current consumption, but the device does not seem to be advertising correctly and it disappears from the LightBLue client that I am using for testing once STOP2 is initiated..

Are there any configuration issues that would cause the BLE stack running on CPU2 to exhibit this behavior? To summarize: advertising works correctly in my test app until I go into STOP2 on CPU1, the base current consumption drops from a1.9 mA to < 6 uA and the current spikes up to 20 mA at the advertisement frequency continue unabated, but my client can no-longer detect any advertisements from the device.

Any hints/advic/suggestions how to debug this would be greatly appreciated.

Thanks,

Kevin

2 REPLIES 2
Remi QUINTIN
ST Employee

In STOP2 mode, all cores (M0+ and M4) are in CSTOP mode and the RF block is not active. So it is not possible to perform any RF activity in STOP2 mode.

As soon as the device starts advertising or any other RF activity, it exits from STOP2 mode.

KRea.1
Associate

HI Remi,

Thanks for your response. I understand the state diagrams for entering and exiting the STOP modes. I did eventually get this to work. The problem was that in my development code I had disabled the Zephyr system tick in an attempt to simplify the scenario. This appears to have been preventing a necessary HCI interaction.

Kevin