This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

NRF51 wake up on Bluetooth disconnection?

Hi,

I put my nrf51 into power-on sleep mode by calling sd_app_evt_wait().

When I walk away with my mobile phone, the bluetooth disconnected and my nrf51 can receive event BLE_GAP_EVT_DISCONNECTED. This event seems cannot wake up my nrf51 because it is not application event. (After I read this thread: devzone.nordicsemi.com/.../).

So how can I wakeup my nrf51 when event BLE_GAP_EVT_DISCONNECTED happens? Thanks.

Dawei

  • Hi Dawei,

    What do you mean by "cannot wake up " ? If you can receive BLE_GAP_EVT_DISCONNECTED event, and jump into the event handler that means the event actually wake the CPU up and the CPU process the event. You can choose to do what ever you want when you processing that event. If you don't really want to put the CPU after that, you can turn off a flag (a variable) so that in the mainloop you stop calling sd_app_evt_wait.

Related