Skip to main content
Daniel L
Associate III
October 18, 2019
Question

Problems Reinitialising the BLE stack after waking up from Standby

  • October 18, 2019
  • 2 replies
  • 1299 views

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

This topic has been closed for replies.

2 replies

Rico
Associate II
October 18, 2019

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.

October 18, 2019

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 ;)

Daniel L
Daniel LAuthor
Associate III
October 18, 2019

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

October 19, 2019

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.