hi dialog
I am using da14580 to make a product that requires a real-time clock, but I understand that the internal time0 and systick will stop running in extended sleep mode, how to enter sleep mode when idle, and at the same time ensure that my RTC timing is correct?
thanks!
Hello
I am trying to get a time in us using the RTC. I have used the function available in RTC application note "DA1468x_RTC_concept_tutorial_v1_00.pdf": uint64_t sw_rtc_convert_lp_to_time(uint64_t
. I am in 'LP_CLK_RCX' mode (
lp_clocks)/* Check whether the lp clock source is the internal RCX */
) and this function uses the global variable rcx_clock_period
:
/*
* Use the variable named [rcx_clock_period] to get the
* current RCX period in usec. Please note that this value
* is multiplied by [1024 * 1024]
*/
time = (lp_clocks * (uint64_t)rcx_clock_period);
time = (time >> 20); // divide with (1024 * 1024)
In idle mode, the time returned is always higher than the previous time got 50ms before.
In extended sleep mode, the time is sometimes smaller than the previous time got 50ms before. So I return to the past.
This is due to the auto-re-calibration when exiting extended sleep mode of rcx_clock_period
.
Do you have an idea about this use case?
Best regards,
Guillaume B.
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.
Hi all.
My project is based on data recorded every day, when at 0:00, then updated data to the server.
The current time in 14580 project can be set by custom.
When the order comes, you can read 7 days of record.
So,I have question:
With 32.768k Crystal,how to get RTC,and set RTC.
thanks.