Close BLE and go into sleep mode

⚠️
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.xmece.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
2 posts / 0 new
Last post
stanley_yeh
Offline
Last seen:1 year 9 months ago
Joined:2016-12-23 06:52
Close BLE and go into sleep mode

Hi,
I am using DA14585 and SDK6.4.2.
Our customer designed a mode named "LOW POWER MODE"
Once finding the voltage is too low, DA14585 will close all functions (BLE, RF, peripheral...etc.) except the RTC.
It means the date & time should be kept in somewhere and close all functions until battery starts charging.

Following is my plan, I am not sure if it works or not. Could you please give me some suggestions?
1. Declare a "uint32_t seconds" to save the time in UNIX timestamp format and be sure that the variable is stored in "retention_mem_area0".
2. Use TIMER0 or TIMER2 to add 1 to the variable every second.
3. Stop BLE advertisement and go to extend sleep.
4. When the device is charging, wake up and start advertising.

By the way, I am just curious, Is there TIMER1 in DA14585? I can find TIMER0 and Timer2 but no TIMER1 in documents, why?

Thank you very much.

Device:
MT_dialog
Offline
Last seen:1 week 6 days ago
Staff
Joined:2015-06-08 11:34
Hi stanley_yeh,

Hi stanley_yeh,

A few comments on what you are mentioning, timers (0 and 2) are off when the device goes to sleep along with all the peripherals, and there is no timer 1 module in the 585, the timers are only timer0 and timer2.

Thanks MT_dialog