Skip to main content

Wakeup from BLE deep sleep using BLE timer

1 week ago

Wakeup from BLE deep sleep using BLE timer

Posted byJin-Hoon Kim60 points 4 replies
0 upvotes

Hi Dialog,

I am trying to make a BLE sleep mode on for certain time period to reduce a power consumption.

基于DA14585数据表我连接,我s instruction for program BLE sleep mode and wakeup in page 136 and 137.

As I understand, when I set the timing of BLE_WAKEUP_LP_IRQ generation by setting BLE_ENBPRESET_REG register, programming the sleep duration of the BLE using BLE_DEEPSLWKUP_REG, and finally setting BLE_DEEPSLCNTL_REG[DEEP_SLEEP_ON] register, I can make BLE sleep mode.

Based on this I can make the device goes into the BLE sleep mode, which stops advertising. However, even after sleep duration expired, the BLE does not wakeup.

I thought after the sleep duration expires, system automatically set BLE_WAKEUP_LP_IRQ interrupt to wakeup the device. Did I misunderstand?

Could you let me know how can I wakeup from the BLE sleep mode after programmed sleep duration?

Thank you!

Jin-Hoon

Attachment Size
da14585_datasheet_3v3.pdf 5.06 MB

1 week ago

PM_Dialog

Hi Jin-Hoon Kim,

Thanks for your question online. Since you are using deep sleep mode, I would recommend using our SDK APIs. To put the device into deep sleep mode, the arch_set_deep_sleep() API should be used.

The DA14585 can wake up from deep sleep from POR pin or GPIO only via the wake-up controller.

http://lpccs-docs.dialog-semiconductor.com/DA14531_Sleep_Mode/deepsleep_config.html

Please see the following tutorial. You could use the pxp_reporter example from the SDK and test the deep sleep.

You should define the CFG_APP_GOTO_DEEP_SLEEP macro in user_proxr.h. Once the device stops advertising, the app_advertise_complete() will be triggered which calls the put_system_into_deep_sleep().

The put_system_into_deep_sleep() configured the wake-up controller as a wake-up source and puts the system into deep sleep mode. If the CFG_DEEP_SLEEP_WAKEUP_POR is defined, the DA14585 can wake up from a POR.

Thanks, PM_Dialog

1 week ago

Jin-Hoon Kim 60 points

Hi Dialog,

Thanks for the answer and comments.

The reason why I use registers written in the datasheet was that I want to wakeup from the BLE sleep mode after certain period of time, using a timer.

When I define CFG_DEEP_SLEEP_WAKEUP_GPIO or CFG_DEEP_SLEEP_WAKEUP_POR to wakeup the device, I think I cannot use a timer. Is it right?

If so, could you let me know how can I use a timer to wakeup the DA14585 from deep sleep mode?

Thank you!

Jin-Hoon

1 week ago

PM_Dialog

Hi Jin-Hoon Kim,

As mentioned in my previous reply and according to the suggested tutorial, then then DA14585 is configured in deep sleep mode, it can wake up only via a GPIO trigger in the WAKEUP controller or via POR.

It is recommended to use the SDK APIs instead of using the registers directly.

Thanks, PM_Dialog

1 week ago

Jin-Hoon Kim 60 points

Hi Dialog,

Thank you for the reply. I will try GPIO trigger to wakeup the device.

By the way, I want to ask you about one more question.

When I used proxy_reporter tutorial based on following instructions, I cannot wakeup the device from deep sleep mode.

Even when I used power on reset (POR) setting and pressed SW1/RESET button on the mother board, the system did not wakeup.

Is there any further setting for software or hardware to wakeup from deep sleep?

I am using Pro Development Kit.

Thank you.

Jin-Hoon