Not applicable
Nov 16, 2015
01:19 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nov 16, 2015
01:19 AM
I'm using RTC (v4.1.6) App and updating the time using "RTC_SetTime(&timeval)".
The problem is that second counter (timeval.seconds) is running faster than the real time. I'm getting the time from a GPS and then update the RTC.
I think the "Time counter" is not set to zero, and this causes the problem.


Can you please confirm that and tell me how to set the "Time counter" to zero?
And if that is not the case, can you give me a solution to the problem?
Thanks
The problem is that second counter (timeval.seconds) is running faster than the real time. I'm getting the time from a GPS and then update the RTC.
I think the "Time counter" is not set to zero, and this causes the problem.
Can you please confirm that and tell me how to set the "Time counter" to zero?
And if that is not the case, can you give me a solution to the problem?
Thanks
4 Replies
Nov 16, 2015
02:19 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nov 16, 2015
02:19 AM
Hi,
You can set TIM0 to zero. Please ensure that you disable the RTC first.
You can set TIM0 to zero. Please ensure that you disable the RTC first.
Not applicable
Nov 16, 2015
02:35 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nov 16, 2015
02:35 AM
Can you please explain more?
I used "RTC->TIM0 = 0;" but the program freezes.
Thank you
I used "RTC->TIM0 = 0;" but the program freezes.
Thank you
Nov 16, 2015
02:45 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nov 16, 2015
02:45 AM
The Timer counter is make up of TIM0 and TIM1 which consist of the bit field of seconds, mins, hrs, days, months and years. In order to edit these bit field, the RTC has to be disabled first (RTC_CTR.ENB = 0).
Not applicable
Nov 16, 2015
03:01 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nov 16, 2015
03:01 AM
I got this error