cancel
Showing results for 
Search instead for 
Did you mean: 

BlueNRG-2 VTimer wake-up the system every 15 sec

EYang
Associate

Hello

We're using BlueNRG-2 VTimer to be RTC for wake-up the system when it's in sleeping mode.

when we set the timer 10mins, it still wake-up the the system every 15 sec.

HAL_VTimerStart_ms(0, 600000);

But I don't turn on the other timer such as 1 or 2 or 3

HAL_VTimer_Stop(1);

HAL_VTimer_Stop(2);

HAL_VTimer_Stop(3);

the callback function still return the interrupt source is from timer 2.

HAL_VTimerTimeoutCallback();

is it possible? how do I solve this issue?

it increases whole the power consumption for nothing..

0690X00000Bw7NWQAZ.png

Elliott

14 REPLIES 14

> How do we ensure that the system is going back to sleep after waking up? I tried adding printfs and led blink, they seem to be executed only once it when wakes up from sleep.

Well, to ensure that can only be done by measuring the current.

If you print something or blink some LED, it means the device is working (not sleeping), so as you can see, the tasks are done when awaking.

> Well, to ensure that can only be done by measuring the current.

If you print something or blink some LED, it means the device is working (not sleeping), so as you can see, the tasks are done when awaking.

I did that and can confirm that the system wakes up in 15 s and does not go back to sleep. The same can be demonstrated using the Micro Sleep Test from STSW-BLUETILE-DK 1.3.0\Project\BlueNRG1_Periph_Examples\Micro\Sleep_Test and changing the WAKEUP_TIMEOUT to say 30 secs and adding a print in the HAL_VTimerTimeoutCallback(). You'll notice the printWakeUpSource() is printed after 15s (which means it was sleeping for 15s and then woke up and printed the wake up source) and the TimerTimeout is printed after 30 s. From T15-T30 the system does not go back to sleep as the current consumption is higher ~2.5mA.

Do we need to call the sleep() function multiple times if we want to implement a sleep > 15s?

Winfred LU
ST Employee

Yes, it is required to call BlueNRG_Sleep() to enter sleep after waken up.

Alright. That seems to be the issue then. Can I suggest adding this in the documentation somewhere? None of the documents have this point that we need to call sleep() multiple times if sleep time > 15s.

The modification will be addressed in the next SDK.