DA14531 sleep mode exit

Learn MoreFAQsTutorials

24 posts / 0 new
Last post
tsgowtham
Offline
Last seen:2 weeks 4 days ago
加入:2020-05-04 12:39
DA14531 sleep mode exit

Hi,

I'm trying to implement any sleep mode on the DA14531 which does not cause a system reset. Can you please provide which sleep modes cause a reset and if a specific sleep mode does not trigger a reset, where does the execution continue from and what will be the state of the BLE connection?

From looking at the proxr_reporter code,

Extended sleep - Continues execution on wakeup

Deep Sleep - Triggers a reset on wakeup

Hibernation - Continues execution on wakeup

Please confirm if these observations are correct and also can you share the link to any documentation which pertains to sleep modes other thanhttp://lpccs-docs.dialog-semiconductor.com/DA14531_Sleep_Mode+/index.html

Thanks,

Gowtham

IM_Dialog
Offline
Last seen:6 days 4 min ago
加入:2016-12-06 22:25
Hi Gowtham,

Hi Gowtham,

If you've not already done so, I'd recommend reviewing the following document:

http://lpccs-docs.dialog-semiconductor.com/Tutorial_SDK6/index.html

The first couple of chapters provide a high level explaination of the operation of the SDK and the associated callbacks, and give some details of sleep modes.

I'd also recommend the empty_peripheral_template as a starting point for any code you are going to write yourself (and this is the basis of the tutorial i mentioned above).

Best regards
IM_Dialog

tsgowtham
Offline
Last seen:2 weeks 4 days ago
加入:2020-05-04 12:39
Hi IM_Dialog,

Hi IM_Dialog,

I followed your suggestion and started a new project with empty_peripheral_template. I have a few more questions

  • I have made only one change to the empty_peripheral_template which is to set app_default_sleep_mode as ARCH_EXT_SLEEP_ON. I noticed on the power profiler that the current consumption increases in the duration between advertisements. I've attached a pdf with the screenshot of the power profiler window and it's settings. And I have removed the jumpers from pins from V_FL through MISO on J1. What could be the issue here?
  • From the tutorial link you have given, I understood that for waking from Extended sleep, the code performs a periph_init and continues execution. But what is done for the other sleep modes?? This has not been mentioned.
  • My application is to read a sensor value using I2C every 20ms and transmit the data to a connected phone. I would like the DA14531 to be in sleep for the rest of the time. Would it be possible to use Hibernation mode or deep sleep in this scenario?

Thanks

IM_Dialog
Offline
Last seen:6 days 4 min ago
加入:2016-12-06 22:25
Hi tsgowtham,

Hi tsgowtham,

I assume that, when you are using the Power Profiler, you are running code on the DA14531 under the control of the debugger. This is OK, however once you start the code running you need to disconnect the debugger by pressing "Ctrl+F5", otherwise the debugger remains active and draws current.

Best regards
IM_Dialog

tsgowtham
Offline
Last seen:2 weeks 4 days ago
加入:2020-05-04 12:39
Hi IM_Dialog,

Hi IM_Dialog,

Thanks for a quick reply. Disabling the debugger fixed that. Now the current consumption is around 0.7 mA when it's in extended sleep mode. But this is still way higher than the 1.2 µA mentioned for Buck mode in the sleep mode tutorial document. Granted that the tutorial used 5 sec as the advertising interval but I doubt the difference is supposed to be this drastic. Anything I'm missing here?

Could you also please provide answers for my 2 other questions I had mentioned in myy last comment. I'm posting it again down here:

  • From the tutorial link you have given, I understood that for waking from Extended sleep, the code performs a periph_init and continues execution. But what is done for the other sleep modes?? This has not been mentioned.
  • My application is to read a sensor value using I2C every 20ms and transmit the data to a connected phone. I would like the DA14531 to be in sleep for the rest of the time. Would it be possible to use Hibernation mode or deep sleep in this scenario?

Thanks

CYibin
Offline
Last seen:3 months 2 weeks ago
Staff
加入:2017-12-14 02:48
Hi tsgowtham,

Hi tsgowtham,

Please refer to my answer to your questions below:

  • From the tutorial link you have given, I understood that for waking from Extended sleep, the code performs a periph_init and continues execution. But what is done for the other sleep modes?? This has not been mentioned.
  • [ycai]其他睡眠模式,而延长leep mode, there will be one more reboot process. Reboot process will re-copy the firmware data from external storage into RAM. The above process has been implemented by the SDK. The above process has been implemented by the SDK. From the perspective of the user, no matter which sleep mode is woken up from, the program will first run to a callback function in the user layer. The callback function may be called by RTC, GPIO, TIMER1 and so on.
  • My application is to read a sensor value using I2C every 20ms and transmit the data to a connected phone. I would like the DA14531 to be in sleep for the rest of the time. Would it be possible to use Hibernation mode or deep sleep in this scenario?
  • [ycai] The answer is yes. However, I suggest to use extend sleep mode, because another sleep mode requires an additional reboot process, which will also consume some power.
    When the sleep interval is long enough (such as 2s), the two external sleep modes are meaningful

Br, Yibin

tsgowtham
Offline
Last seen:2 weeks 4 days ago
加入:2020-05-04 12:39
Hi Yibin,

Hi Yibin,

Your answers were really informative and helpful. Thank you!

One last thing I'm stuck at is the high power consumpion in Extended Sleep mode( Mentioned in my last reply) which is at 0.7 mA approximately, without the debugger attached. How can I bring this value closer to the 1.2 µA mentioned in the sleep mode tutorial.

Thanks

CYibin
Offline
Last seen:3 months 2 weeks ago
Staff
加入:2017-12-14 02:48
Hi,

Hi,

In order to eliminate the interference of other factors, can you do a test first, as follows:

0. Unplug all jumpers on J19 on 531 dev-kit

1. Download the firmware of prox_reporter project in SDK into FLASH on 531 dev-kit

2. Unplug and reinsert the USB cable

3. Open SS toolbox -> select UART/SPI interface -> open power-profile tool

Pls tell me what you see on the screen of power-profile tool.

Br, Yibin

tsgowtham
Offline
Last seen:2 weeks 4 days ago
加入:2020-05-04 12:39
Hi Yibin,

Hi Yibin,

I have attached the power profiler output for the proxr project. I used the pre built downloadable firmware available in the Flash Programer tool. This output seems closer to what is expected. Why is there such a huge difference in the current consumption between these two projects? Is there any other project configuration which might be causing this?

@Jon_ODonnell

Try calibrating the power profiler, maybe that might help in giving a proper reading for the prox reporter project. Also, 0.167 mA for the barebones project looks like a bit too much for the extended sleep mode, would be better if Yibin clarifies this though.

Thanks,

Gowtham

Jon_ODonnell
Offline
Last seen:1 month 3 weeks ago
加入:2020-08-08 17:23
@Yibin,

@Yibin,

I set the calibration to 0 mA and ran with no board installed. The average current was 1.77 mA! I tried putting -1.77 in the calibration offset, but then I got negative current. The numbers jumped around.

I suspect both the offset and gain are having problems. Do I have a bad board? I just purchased it from Digi-key.

I attached a pic of the board to show jumpers, etc. and some screen shots.

Jon

Attachment:
Jon_ODonnell
Offline
Last seen:1 month 3 weeks ago
加入:2020-08-08 17:23
I found the problem! For

I found the problem!For some reason, the current drawn from the SPI-Flash is also measured and it is not going into the low power sleep. If I remove the J1 V_FL jumper, the current goes down to 0.02 mA during the calibration.

I removed the jumper and added a wire from J1-1 to J9-2 to power the flash without measuring the current.

The average current for the DA14531-DA14585-586_Service_Data_Beacon is now onlt 0.008 mA with peak of 2.816 mA. The prox_reporter still measures a 0.000000 mA flat-line. The barebones gives 0.156 mA average and 2.893 mA peak.

tsgowtham
Offline
Last seen:2 weeks 4 days ago
加入:2020-05-04 12:39
An update to my last comment:

An update to my last comment:

I tried flashing my empty-peripheral-template project with Extended sleep enabled to the Flash. I saw an average currrent consumption of 0.24596 mA and a peak currrent of 3.97961 mA. The average current still seems a bit high too high for extended sleep.

Jon_ODonnell
Offline
Last seen:1 month 3 weeks ago
加入:2020-08-08 17:23
I am having the same problem.

I am having the same problem. I started with DA14531-DA14585-586_Service_Data_Beacon which sets
app_default_sleep_mode = ARCH_EXT_SLEEP_ON;
but the current between advertisements in the unmodified example is about 1.7mA. Changing to ARCH_SLEEP_OFF increases the current to 1.9mA.

This is with using the SmartBond Flash Programmer and cycling power to the Dev Kit before making the measurements.

Jon_ODonnell
Offline
Last seen:1 month 3 weeks ago
加入:2020-08-08 17:23
I downloaded prox_reporter

I downloaded prox_reporter (both built from SDK source and the pre-built "Download online firmware" version from the SmartBond Flash Programmer) and the both the peak and average current measured as requested is 0.00000 mA. The graph is a straight line at the bottom (see attached pdf).

I verifed with BLE Scanner that the DLG-PROXR device was advertizing every 689ms.

I also tried the pre-built ble_app_barebone_531.out.bin from the online resources. The current looked more normal with an average of 0.16758 mA and peak of 3.181 mA.

Please let me know if I should move this discussion to a different thread. It appears to be the same problem, but I do not want to hijack the thread.

Jon

PW_Dialog
Offline
Last seen:4 days 11 hours ago
Staff
加入:2019-04-03 02:54
Hi Jon,

Hi Jon,

So w/o the SPI flash issue you are facing one problem of the "zero current consumption" with prox_reporter? Can you confirm the steps suggested by Yibin?

0. Unplug all jumpers on J19 on 531 dev-kit

1. Download the firmware of prox_reporter project in SDK into FLASH on 531 dev-kit

2. Unplug and reinsert the USB cable

3. Open SS toolbox -> select UART/SPI interface -> open power-profile tool

Br,

PW_Dialog

Jon_ODonnell
Offline
Last seen:1 month 3 weeks ago
加入:2020-08-08 17:23
Those are the steps I

Those are the steps I performed. With the F_FL jumper on J1 installed, the zero current measures 1.7 mA. When I remove the jumper and repeat the test, the zero current is 0.020 mA. Changing the calibration offset to -0.02 results in an average current of -0.0005 mA.

tsgowtham
Offline
Last seen:2 weeks 4 days ago
加入:2020-05-04 12:39
Hi,

Hi,

In my last comment I have posted a screen shot of the power profiler and the averag current consumed is 0.02mA after I programmed the flash. This is still higher than the expected 1.2µA. What else should I try to reduce the current consumption?

Thanks

PM_Dialog
Offline
Last seen:1 hour 3 min ago
Staff
加入:2018-02-08 11:03
Hi tsgowtham,

Hi tsgowtham,

Could you please take a look at the Sleep mode tutorial from our support website? Link is provided below.

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

Thanks, PM_Dialog

tsgowtham
Offline
Last seen:2 weeks 4 days ago
加入:2020-05-04 12:39
Hi PM_Dialog,

Hi PM_Dialog,

I have gone through this document. As a matter of fact, I have even added it in my original post.

I'll post my final query here again for clarity:

The average current consumed in Extended Sleep mode is 0.02 mA(measured using the power profiler) and the sleep mode tutorial says that it should be around 1.2 micro Amps. I have written the program to the SPI Flash in the DA14531 module and disconnected the jumpers for the Flash on the motherboard. How can I get the average current consumption close to the given 1.2 micro amps range?

Thanks

PM_Dialog
Offline
Last seen:1 hour 3 min ago
Staff
加入:2018-02-08 11:03
Hi tsgowtham,

Hi tsgowtham,

In the Sleep mode tutorial, the tables with extended sleep mode currents are for the DA14531. In your initial post, the DA14531 module is tagged. Please refer to the module’s datasheet and see Table 4: DC Characteristics.

You mentioned that the average current consumption is 0.02 mA. What is the advertising interval that you are using? Here, the device is advertising and goes into extended sleep mode between advertising intervals and it will automatically wakes up via the BLE timer.

If you follow that sleep mode tutorial, you will see that the after the advertising period, the chip will stop advertising and is going into permanent sleep mode (without BLE activity). How mush is the current consumption in permanent sleep mode?

Additionally, can you please indicate the project that you are using? If you could share it with me it would be helpful in order to run it in my side too.

Thanks, PM_Dialog

tsgowtham
Offline
Last seen:2 weeks 4 days ago
加入:2020-05-04 12:39
Hi PM_Dialog,

Hi PM_Dialog,

Sorry for replying after a long time.

The average consumption is 0.02 mA with the advertising interval at 687.5 ms. This is with the prox_reporter project. The current consumption when it is in permanent sleep is 0.01 mA.

I tried using the template project with Extended sleep mode enabled to test the current consumption. With this project, I observed a 0.2 mA current consumption with advertising interval of 687.5 ms . I have attached this project and it's just a one line change in the template project.

Edit: Is there any difference in these 2 projects which result in such a large difference in current consumption even though both are using Extended sleep mode and the same advertising interval?

Attachment:
PM_Dialog
Offline
Last seen:1 hour 3 min ago
Staff
加入:2018-02-08 11:03
Hi tsgowtham,

Hi tsgowtham,

The empty_peripheral_template does not stop advertising, so the device sleep between advertising or connection intervals. The prox_reporter is using advertising with time-out, so the system is going into sleep mode not only between advertising or connection intervals, bus once the advertising is stopped and it goes into permanent sleep mode. However, the prox_reporter is using the SPI flash, so to reduce the power consumption, you need to power it down and release it once the device wakes up.

Thanks, PM_Dialog

tsgowtham
Offline
Last seen:2 weeks 4 days ago
加入:2020-05-04 12:39
Hi PM_Dialog,

Hi PM_Dialog,

I had spoken to Dialog's represantative in my city and he gave me a similar suggestion and told me to configure the SPI pins. This solved my problem and drastically reduced the power consumption.

Thanks a lot for helping with my questions!!

A suggestion, it would be great if your suggestion could be mentioned in some documentation for the DA14531 module. I'm pretty sure a person new to using these kinds of Flash ICs would not think of this.

Thanks

PM_Dialog
Offline
Last seen:1 hour 3 min ago
Staff
加入:2018-02-08 11:03
Hi tsgowtham,

Hi tsgowtham,

Glad that you are able to reduce the power consumption and thanks for accepting my answer. Thanks for your feedback too!

Regards, PM_Dialog