cancel
Showing results for 
Search instead for 
Did you mean: 

Problems Reinitialising the BLE stack after waking up from Standby

Daniel L
Associate III

Hi, I am having issues reinitialising the BLE stack after waking up from sleep. I am initialising it the exact same was as normal power on. Upon waking up and calling the TL_Enable() function, a shci_notify_asynch_evt it not being received. Is there any examples on how to reinitialise after standby mode?

Thanks,

Daniel

4 REPLIES 4
Rico
Associate II

I'm having nearly the same problem, I'm getting troubling with BLE when exiting STOP MODE 2.

I will follow this thread with interest.

Vyacheslav
Senior II

Hi,

I do like this:

to stop second stone, I call:

LL_C2_PWR_SetPowerMode(LL_PWR_MODE_SHUTDOWN);

then to start it I call:

LL_C2_PWR_WakeUp_BLE();

and after wait 200 ms , mandatory call

APP_BLE_Init();

this call needed to reinit stack.

I hope this helps you.

Best,

Vyacheslav.

P.S. so sorry, I wrote using 1 finger on the phone ;)

Hi Vyacheslav,

Thank you for your reply. I have tried the following code and it unfortunately results in a hardfault within APP_BLE_Init() that does not occur on 1st call on startup.

if(PWR->SR1 & PWR_SCR_CWUF4)
{
    LL_PWR_ClearFlag_WU(); // Clear WKUP Flags
 
    LL_C2_PWR_WakeUp_BLE();
 
    /* Delay 200ms */
    for(i = 0; i < 4800000; ++i);
 
    APP_BLE_Init();
}

0690X00000AqZIdQAN.png

Hi, Daniel.

I apologize, I thought you were talking about the second stone when you mentioned standby mode.

In your case, my solution is not suitable.

On the other hand, if "shci_notify_asynch_evt()" is not called, then "APPE_SysUserEvtRx()" will not be called and "APP_BLE_Init()" too.

This means that the second stone is not working, but why, you need to find out.