Sleep mode entering for ever DA14580 with SmartTags proximity firmware and app

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.wsdof.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
9 posts / 0 new
Last post
MADHUSF
Offline
Last seen:1 month 1 day ago
加入:2018-01-15 09:22
Sleep mode entering for ever DA14580 with SmartTags proximity firmware and app

hi, we have exact hardware(PCB) as that of proximity reference design and I could burn the proximity smart tag firmware and able to communicate with it. My setup is fine. I use SmartTags android app to test it. I am trying to modify the firmware and connect with the app. Initially it works but after some time it goes for sleep and it never shows up in the android app. Please let us know the solution for this. Even the example firmware without modifying the code also am seeing this behavior. Is there anyway to reconfigure or avoid the sleep mode..etc. Help needed, thank you.

Device:
Qinjiny_Dialog
Offline
Last seen:2 weeks 1 day ago
Staff
加入:2016-11-01 05:47
Hi MADHUSF,

Hi MADHUSF,

默认情况下距离演示将停止乱发广告tising and goes to deep sleep after a period of advertising untill a button is pressed. This is not an issue but a setup to save power.

You don't have to totally disable sleeping, just remove the timout settings on advertising.

Go to user_config.h

set .adv_scenario=DEF_ADV_FOREVER,

under user_default_hnd_conf

and see if it works as you want

MADHUSF
Offline
Last seen:1 month 1 day ago
加入:2018-01-15 09:22
Hi Qinjiny, thanks for the

Hi Qinjiny, thanks for the reply. I checked the code.
This setting was already there in the user_config.h per below. Please let me know if any other settings missing. Also, please let me know in which code this button functionality is taken care.
----------------------- user_config.h-----------------
.....
static const struct default_handlers_configuration user_default_hnd_conf = {
//Configure the advertise operation used by the default handlers
//Possible values:
// - DEF_ADV_FOREVER
// - DEF_ADV_WITH_TIMEOUT
.adv_scenario = DEF_ADV_FOREVER,

//Configure the advertise period in case of DEF_ADV_WITH_TIMEOUT.
//It is measured in timer units (10ms). Use MS_TO_TIMERUNITS macro to convert
//from milliseconds (ms) to timer units.
.advertise_period = MS_TO_TIMERUNITS(10000),

//Configure the security start operation of the default handlers
//if the security is enabled (CFG_APP_SECURITY)
.security_request_scenario = DEF_SEC_REQ_ON_CONNECT
};

..
-----------------------------------

LC_Dialog
Offline
Last seen:1 week 13 hours ago
Staff
加入:2016-09-19 23:20
Hi MADHUSF,

Hi MADHUSF,

The external wakeup mechanism is being set in theapp_advertise_complete()callback in user_proxr.c file. However, if the scenario is set to DEF_ADV_FOREVER, then the system should not reach this point. If this system still goes to sleep and never wakes up, then there is some other potential issue. Please try the following steps to isloate the issues in hardware/ software.

1. Try and run a clean out of box prox_reporter project on a Dev Kit with the Adv scenario set to FOREVER. If you don't see any issues, then run this same image on your Custom hardware and see if that works fine. If there are issues here, then the problem might be in the Custom hardware.

2. Also, program a Dev Kit with the image that you are using now that is causing this sleep issue. Using Power Profiler tool in SmartSnippets Toolbox, check the readings when it is in the permanent sleep stage. The reading can provide some insight into understading if the system is in complete sleep or if there is a crash.

3. You can also debug this program on the Dev Kit from the Keil MDK and see if it is reaching any of the breakpoints or watchdog reset etc., which will confirm a crash.

Please let us know what are your observations in these test.,

Also, what are all the changes that you have made in the default project. This might give some information about what might be causing this issue.

Best,
LC_Dialog

MADHUSF
Offline
Last seen:1 month 1 day ago
加入:2018-01-15 09:22
hi LC_Dialog, thanks for the

hi LC_Dialog, thanks for the reply . I tried and the response per below.

1. Try and run a clean out of box prox_reporter project on a Dev Kit with the Adv scenario set to FOREVER. If you don't see any issues, then run this same image on your Custom hardware and see if that works fine. If there are issues here, then the problem might be in the Custom hardware.
Ans: Yes, no issues found and its working. Actually, the app was locking in the background the bluetooth sessions/objects. so, had to restart or kill the app to scan again and connect.

2. Also, program a Dev Kit with the image that you are using now that is causing this sleep issue. Using Power Profiler tool in SmartSnippets Toolbox, check the readings when it is in the permanent sleep stage. The reading can provide some insight into understading if the system is in complete sleep or if there is a crash.
Ans: I am not sure how to use power profiler, but used it : always its showing the same current , no variations. Please suggest the settings.

3. You can also debug this program on the Dev Kit from the Keil MDK and see if it is reaching any of the breakpoints or watchdog reset etc., which will confirm a crash.
Ans: Not tried, I guess the sleep issue for now is resolved.

Question: But, I need to know how do we wakeup from extended sleep or deep sleep without any GPIO trigger? Please suggest. As the current power draw based on mutlimeter measure is showing about 600 uA current usage with this proximity project. Please help us on reducing the power and optimum values.

Thank you,
MadhuSF

LC_Dialog
Offline
Last seen:1 week 13 hours ago
Staff
加入:2016-09-19 23:20
Hi MadhuSF,

Hi MadhuSF,

Did you track how the issue was resolved. Please post on this thread so that other users can also take advantage of it.

Regarding your question.,
You wakeup from Extended sleep by just configuring the Sleep mode to extended sleep. It will configure a timer internally and wakeup at intervals to execute any BLE events or any user defined events (that you need to add at specific callback points to process any data). If you are not doing any data processing in your application, then your sleep current should be much lesser than what you are experiencing now. I would suggest to review your design for any current leaks etc., to make sure that there is no extra current drawn by your external peripherals.

If you would like us to do a quick review of your design, send your schematics along with the datasheets for the inductor (L1) on SWITCH and the 16MHz crystal (Y1). If you would like to share this securely, I can send you a secure server link to upload your files.

Best,
LC_Dialog

MADHUSF
Offline
Last seen:1 month 1 day ago
加入:2018-01-15 09:22
Dear LC_Dialog, Please send

Dear LC_Dialog, Please send me the secure link so that I will share you the design, scope of requirements and sleep requirements. Thank you.

LC_Dialog
Offline
Last seen:1 week 13 hours ago
Staff
加入:2016-09-19 23:20
Hi MadhuSF,

Hi MadhuSF,

Upload your files to the server using the following link. Note that you can only upload here.

https://diasemi.egnyte.com/ul/Jrgzqaa9X6

Best,
LC_Dialog

LC_Dialog
Offline
Last seen:1 week 13 hours ago
Staff
加入:2016-09-19 23:20
Hi MadhuSF,

Hi MadhuSF,

从图表,我已经注意到,你是你sing a Module in your design. The module design guidelines can be different from our design guidelines. The basic checks that we do on customer designs has already been done on the Module and rest of the components should be desinged into the system as per the Module vendor's recommendations which is something that the vendor of the module can help with.

I would recommend first looking into you software application to see if the device is really going into sleep or not. Because the current consumption you are seeing is close to the Active current and this can be mostly due to some issues in the software design or if the main loop is modified that keeps the processor active. Refer to our Documents on the support website on how to take advantage of our tools like SmartSnippets Toolbox etc., and you can check what is happening during the program execution.

Best,
LC_Dialog