Skip to main content

Get time from RTC module

DA14580

1 year ago

Posted by Thanhtu131 0 points 6 replies
0 upvotes

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
 

accepted answer!

1 year ago

PM_Dialog

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

1 year ago

Thanhtu131 0 points

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?

accepted answer!

1 year ago

PM_Dialog

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

1 year ago

Thanhtu131 0 points

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 

 

1 year ago

PM_Dialog

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

1 year ago

Thanhtu131 0 points

thanks, i got it