2021-06-28 09:13 PM
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
2021-07-21 01:31 AM
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.
2021-07-21 08:37 AM
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