2019-10-18 12:34 AM
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
2019-10-18 02:11 AM
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.
2019-10-18 03:32 PM
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 ;)
2019-10-18 04:50 PM
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();
}
2019-10-19 03:49 AM
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.