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_advtodefault_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()callsarch_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


Hi moguilevski,
Thanks for your questions.
Thanks, PM_Dialog
Hello PM_Dialog,
我使用的电流测量SmartSnippets power profiler with DK Pro and a multimeter with DK Basic. In the latter case, I use 3V battery and disconnect the board from the computer for the measurement. Flashing in both cases occures via Keil's debug session.
After implementation of the changes suggested for the Point 1, there is no advertising at start any more. However, the current is than the same as it is in Point 2 (~ 0.4mA).
What do you mean with the attached debugger? Also, can define/undefine CFG_DEVELOPMENT_DEBUG block the sleep mode?
Thank you!
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?
Thanks, 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_initnow is:
Thank you very much!
With best regards
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.
Thanks, PM_Dialog