This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: Re: Adjustable wallclock (get/settimeofday, adjtimex)?
- From: Stanislav Meduna <stano at meduna dot org>
- To: ecos-discuss at ecos dot sourceware dot org
- Date: Mon, 27 Jun 2011 16:48:26 +0200
- Subject: Re: [ECOS] Re: Adjustable wallclock (get/settimeofday, adjtimex)?
- References: <4E07AFED.6040405@meduna.org> <iua3cq$ggp$1@dough.gmane.org>
On 27.06.2011 16:16, Grant Edwards wrote:
> When I needed to adjust the time to keep it in sync with a real-time
> clock, I did it at a lower level by adding hooks into the target's HAL
> code that allowed me to gradually slew the cyg_current_time() value by
> adjusting the length of a system tick by small amounts.
Could you elaborate a bit? Did you change the hardware's interrupt
frequency? This would be the best solution, but it depends on how
easy the frequency can be adjusted without disturbing the current
running interval, if at all (e.g. on some hardware the counter
reload value can't be accessed atomically and hitting the wrong
values at wrong time could produce unacceptable clock interrupt
jitter).
Regards
--
Stano
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss