cancel
Showing results for 
Search instead for 
Did you mean: 

HW Timer Server Wakeup Period / Low Power Manager / Sequencer

TomC
Senior

I am trying to use the HW Timer Server Library, Low Power Manager and Sequencer on an STM32WB to wakeup/sleep my system to/from STOP2 mode. It seems that the system checks the timer once per second. I am monitoring the STM32WB power using STM32CUBEMonitorPower and the XNUCLEOLPM01A. 

In the image below I have set a timer server for 5000ms and then go to STOP2. It is expected behaviour to have the system wake up once per second to check the state and then go back to sleep?

TomC_0-1709090074620.png

PS: More info on Low Power Manager, Timer Server and Sequencer in AN5289 Section 4.

EDIT: In this example I am just going to SLEEP power state not STOP2 as I wanted to use the debugger.

 

 

8 REPLIES 8
_Joe_
ST Employee

Hi TomC,
Could you please take a screenshot centered on one of these spikes to see their shape?

Joé

Hi Joe,

Below is a zoomed in spike

TomC_0-1709163600443.png

 

_Joe_
ST Employee

Hi TomC,

You should not be seeing these kinds of spikes.
I think the easiest way would be to start from BLE_HeartRate, which is optimized for low power and will allow you to follow the correct process of the power manager.

Keep me updated on your progress ;)

Hi Joe,

I've been leaning on the Heart Rate example quite heavily to get this far however it isn't clear to me the difference between my codebase and the example that would cause this behavior, no doubt there is one I just can't find it. Is there any specific area of the Heart Rate example you could recommend I look at. Noting that my project's RTC configuration (MX_RTC_Init( ) ) is identical to the Heart Rate example.

Kind regards,
Tom

Roger SHIVELY
ST Employee

Hello @TomC 

This post has been escalated to the ST Online Support Team for additional assistance.  We'll contact you directly.

Regards,

Roger

gonzalopuy
Associate

Hello! @TomC , @_Joe_  and @Roger SHIVELY ,

Hope you are all doing well.

I know this thread is quite old but I think It's related to a similar problem I'm currently having.

Is it possible that the RTC wakeup functionality used by HW Time Server is producing this constant wake up attempt?


@TomC wrote:

TomC_0-1709090074620.png


If that is the case, then the Timer set at LpTimerStart() function on 'freertos_port.c' file would be kind of useless because It would keep reseting constantly every time the system re-enter STOP mode after the RTC wake-up interrupt.

I'm basing my LPM implementation on the 'BLE_HeartRateFreeRTOS' example.

Are there any updates on this issue?

Hi gonzalopuy,

Unfortunately I was unable to find a solution to this issue, but when I monitored the power consumption of my device (using a Joulescope) the spikes were so brief in duration that they had little meaningful impact on the power performance the device and seemed not to affect the function of the device. I suspect what you said about the HW Time Server and RTC is correct.

ST followed this issue up with me via email but their advice was to essentially follow the example projects that exist. I can't speak to integrating with FreeRTOS as I used the STM32 Sequencer structure for my project. 

Kind regards,
Tom

Hi TomC,

Thank you for taking the time to answer my question.

I will stick to the example project and do my best to adapt it to my application needs, hoping that the power performance will not be affected by this issue.

Hope you have a great week.

Kind regards,

Gonzalo