Learn MoreFAQsTutorials

6 posts / 0 new
Last post
moguilevski
Offline
最后一次露面:3 hours 18 min ago
Joined:2019-04-30 12:25
Extended sleep at start

Dear DS team,

I have two questions for you:

1). Is there any possibility to proceed with the extended sleep mode directly after the initialization of the processor instead of the advertising (advertising can start later, e.g. initiated by external interrupt)?

2). Also, I'm using the barebone example as the base. I changed.default_operation_advdefault_advertise_operation, the default sleep mode to extended sleep without OTP, and the default handlers configuration to the "timeout-scenario". Thus, the advertising stops after the defined time interval anduser_app_adv_undirect_complete()呼叫arch_ble_ext_wakeup_on(). I'm expecting extended sleep mode at this point, however, the current stays around 0.4 mA. This is definitely to much for the extended sleep mode. What could prevent the processor from switching to the sleep mode? Are there any crucial points, that I didn't consider?

Thank you and best regards

Device:
PM_DIALOG.
Offline
最后一次露面:4 hours 5 min ago
Staff
Joined:2018-02-08 11:03
Hi moguilevski,

Hi moguilevski,

Thanks for your questions.

  1. Yes, it is possible. You can initiate the system in sleep mode instead of starting advertising. By default the ble_app_barebone example and all the other BLE example of the SDK, start advertising. Please check the .default_operation_adv callabk function. In you case, you should set this callback into NULL and set the device into extended sleep mode in the app_on_init() function. By this way, the device will be initiated in the extended sleep mode upon the boot. Keep in mind that you should wake up the device if you would like to start advertising. Please check the ble_app_sleepmode example of the SDK. You can wake it up either synchronously, via the BLE timer which can be programmed to wake up the system, or asynchronously, via an external interrupt(input). All the peripherals domain in sleep mode are powered down. In addition, the device will enter the sleep mode between advertising or connection intervals. Please let me know if you need further steps on how to implement it.
  2. Can you please share more inputs regarding the procedure you are following in order to measure the sleep currents? Are you booting from Flash or SysRAM? In addition, is the debugger attached? If yes, this prevents the system to go into sleep mode. I would recommend first checking theTutorial 4: Sleep modes current measurement从我们的支持网站并按照测量睡眠模式电流的步骤/

谢谢,PM_DIALOG.

moguilevski
Offline
最后一次露面:3 hours 18 min ago
Joined:2019-04-30 12:25
Hello PM_Dialog,

Hello PM_Dialog,

对于当前测量,我使用SmartSnippets电源分布器与DK Pro和DK Basic的万用表。在后一种情况下,我使用3V电池并断开电路板与计算机的连接进行测量。两种情况下闪烁通过Keil的调试会话发生。

在实施第1点建议的变更后,在开始时没有任何广告。但是,电流比在2点2(〜0.4mA)中相同。

What do you mean with the attached debugger? Also, can define/undefine CFG_DEVELOPMENT_DEBUG block the sleep mode?

Thank you!

PM_DIALOG.
Offline
最后一次露面:4 hours 5 min ago
Staff
Joined:2018-02-08 11:03
Hi moguilevski,

Hi moguilevski,

你能请分享你如何设置睡眠mode? Are you using this arch_set_sleep_mode (ARCH_EXT_SLEEP_ON ) in the app_on_init()? When using Keil IDE, the firmware is downloaded into System-RAM and the DA14585 boots from there. I assume that you are using the “Start/Stop debug session button” in order to download firmware. I you press it once and then press “run” the firmware s running with the debugger attached. This prevents the system to go into sleep mode. To do so, you should press the “Start/Stop debug session button” button twice. You should not undefine the CFG_DEVELOPMENT_DEBUG macro. Did you followed the tutorial I suggested you in my previous comment?

谢谢,PM_DIALOG.

moguilevski
Offline
最后一次露面:3 hours 18 min ago
Joined:2019-04-30 12:25
Dear PM_Dialog,

Dear PM_Dialog,

I didn't used arch_set_sleep_mode(ARCH_EXT_SLEEP_ON) in the app_on_init() because of the assumption that the default setting:

static const sleep_state_t app_default_sleep_mode = ARCH_EXT_SLEEP_ON;

in user_config.h is enought. But it was probably not taken into account (please, correct me if I'm wrong), because the corresponding callback function from the main loop callbacks was not default. After addingarch_set_sleep_modefunction to the app_on_init(), I measured 2.9µA current. I assume, it will be also the solution for the Point 2.

The.app_on_init现在是:

void user_app_init(void) { arch_set_sleep_mode(ARCH_EXT_SLEEP_ON ); arch_ble_ext_wakeup_on(); }

Thank you very much!

With best regards

PM_DIALOG.
Offline
最后一次露面:4 hours 5 min ago
Staff
Joined:2018-02-08 11:03
Hi moguilevski,

Hi moguilevski,

Glad that you are able to measure the correct current in extended sleep mode. This will put the device into permanent sleep mode. I you found any of the above comment as useful, please mark it “accepted” for any other forum user. If you have any other questions, please create a new forum thread.

谢谢,PM_DIALOG.