The DA14586 can be woken up in 2 ways: 1) Synchronously, via the BLE timer which can be programmed to wake up the system, 2) Asynchronously, via an external interrupt (input). Can this be done at the same time.
That is: DA14586 is set as non_connectable device and set to broadcast in regular interval. It schedules the next advertising data update using
app_adv_data_update_timer_used = app_easy_timer(APP_ADV_DATA_UPDATE_TO, adv_data_update_timer_cb);
(and the command "app_easy_gap_advertise_stop()" which will stop advertisements until and external interrupt is received is REMOVED)
meaning, the DA14586 is
1) put in non_connectable mode (Continuously broadcasting on a regular interval)
2) On a regular basis, DA14586 is put on sleep mode and wake up synchronously using BLE timer and broadcast a packet (sleeps in between broadcasts)
3) When a certain event happens (say GPIO0) can it force to wake up the DA14586 which is on sleep and execute the instruction insde the call back function and got to sleep again and then continue the wakes up synchronously using BLE timer. (During the interrupt driven wake up, execute the instruction inside the call back function and go back to normal synchronous sleep mode with regular broadcasting)
What I feel is happening in my set up is that all interupts are disabled and hence it doesn't see any (external) interrupts.
Thank you for your help.
Anushiya
Hi anushiya,
You could have both in the same project. Could you please explain little bit your third statement> How did you configure the wake up controller in order to detect the wake up interrupt? I would suggest you to have a look the ble_app_sleepmode example of the SDK.
Thanks, PM_Dialog
Thank you for your reply.
I used the ble_app_sleepmode as the starting point.
My question is not only having both in the same project.
It is about can I have both sleep mode active at the same time.
Meaning, the device will be in synchronous sleep
(example => broadcast a packet, sleep, broad cast a packet, sleep, broadcast a packet, sleep, and so on).
But it gets interrupted irespective of whether it is sleeping or awake.
(example => broadcast a packet, sleep, broadcast a packet, sleep, interrupted sleep and service that interrupt, continue sleep, broadcast a packet, sleep, broadcast a packet)
Or
(example => broadcast a packet, sleep, broadcast a packet, interrupted broadcast and service that interrupt, continue broadcast, sleep, broadcast a packet, sleep, broadcast a packet)
Hi Anushia,
The wakeup counter (which is the hardware block used to ensure wakeup on GPIO transition while at sleep) will work whether or not the device is sleeping, and whether or not you have autonomous wakeups due to BLE activity.
/MHv