Get time from RTC module

Learn MoreFAQsTutorials

7 posts / 0 new
Last post
Thanhtu131
Offline
Last seen:1 month 6 days ago
Joined:2018-09-18 17:44
Get time from RTC module

Hi, i had bought DA14580 basic kit. I have to work with it. Now I am making a timer device using DA14580. The Specific time will be set on my android phone. DA14580 will take the set-time information from android phone( through BLE GATT connection). Then DA14580 will take real-time information from RTC module ds1307 ( through I2C communication protocol ) and activate the buzzer depending on the set-time. But according to the DA1458x Software Platform Reference UM-B-051 doccument, after the BLE work is done, DA14580 will go to sleep mode (Extended/Deep sleep mode) then the radio domain, the peripheral domain are powered down and the XTAL16M clock is stopped. So how can i use the I2C connection in sleep mode? or Must i use an External Processor? Thanks

Device:
PM_Dialog
Offline
Last seen:9 hours 21 min ago
Staff
Joined:2018-02-08 11:03
Hi Thanhtu131,

Hi Thanhtu131,

This application specific. Is the power consumption critical in your design?

The sleep modes are used in order to have lower current consumption. However, in sleep mode, all the peripherals domains are shut down (including I2C), so you will not be able to use any of the peripheral blocks.

If the power consumption is not critical, you can configure the DA14580 in active mode, so that you will always be able to use I2C.

You can also have a combination of sleep and active mode. No need for an external processor.

Thanks, PM_Dialog

Thanhtu131
Offline
Last seen:1 month 6 days ago
Joined:2018-09-18 17:44
Can i set the wake up time 1s

Can i set the wake up time 1s or 0.5s? Then DA14580 can wake up and check the i2C data and go to sleep mode again? Will the power consumption be reduced better than setting active mode all the time?

PM_Dialog
Offline
Last seen:9 hours 21 min ago
Staff
Joined:2018-02-08 11:03
Hi Thanhtu131,

Hi Thanhtu131,

The device goes into sleep mode between advertising or connection intervals and wakes-up via a BLE timer. In general, yes you can use a timer to wake up periodically but again it is application specific. You can interact with the I2C interface only in active mode – when you don’t need to have I2C activity then you should put the device is sleep mode.

Thanks, PM_Dialog

Thanhtu131
Offline
Last seen:1 month 6 days ago
Joined:2018-09-18 17:44
Thanks for your answer. My

Thanks for your answer. My product will receive the shedule(time, day...) from my phone, then it will continuosly compare the received schedule with the real time information gotten from ds1307 ( using i2c interface ) and trigger the buzzer. But the point is continuosly getting real time information may cause much energy consumption. And the application will not be BLE :) so I have 2 way to follow:

1/ set the application always in active mode

2/ set the the application sleep time to be 1s. then it wake up and do the job the sleep again...

Does the second way reduce energy consumption more than the first one? Do you have any suggestion? thanks

PM_Dialog
Offline
Last seen:9 hours 21 min ago
Staff
Joined:2018-02-08 11:03
Hi Thanhtu131,

Hi Thanhtu131,

Since it the DA14580 will be connected with a peer device, if you have configured it in sleep mode, it will go into sleep between connection intervals. No need to setup a timer in order to put it in sleep since it is connected .

You can setup a timer in order to stop advertising and put it in sleep mode. Similar as ble_app_sleepmode example of the SDK.

Thanks, PM_Dialog

Thanhtu131
Offline
Last seen:1 month 6 days ago
Joined:2018-09-18 17:44
thanks, i got it

thanks, i got it