[ECOS] [Fwd: Re: [ECOS] sntp problems]

Laurie Gellatly laurie.gellatly@netic.com
Sun Jan 14 06:32:00 GMT 2007


Hi Gary,
Applied your patch. When I sorted out the other wallclock problem I had,
it then all works.

Your helpw as much appreciated.

			...Laurie:{)

-----Original Message-----
From: ecos-discuss-owner@ecos.sourceware.org
[mailto:ecos-discuss-owner@ecos.sourceware.org]On Behalf Of Gary Thomas
Sent: Friday, 12 January 2007 11:48 PM
To: Laurie Gellatly
Cc: eCos discussion
Subject: Re: [ECOS] [Fwd: Re: [ECOS] sntp problems]


Gary Thomas wrote:
> Gary Thomas wrote:
>> Laurie Gellatly wrote:
>>> Couldn't find anyting about the timezone offset.
>>> Looks like it needs to be added in when the time is adjusted back to
>>> 1900.
>>>
>>> My other problem with the locking up turns out to be the new
>>> impolementation
>>> of the I2C clock chip
>>> I'm using and the set_current_time function that calls cyg_drv_dsr_lock.
>>> Trouble is that the I2C clock is interrupt driven and the
>>> cyg_drv_dsr_lock
>>> prevents the DSR from running.
>>> I'm using a dallas 1307 variant but I don't see anything in that code
>>> that
>>> tries to address this.
>>> Does anyone know why cyg_drv_dsr_lock is used in set_current_time?
>>> Anyone using an interrupt based I2C clock that might have addressed
>>> this?
>>
>> Any piece of code that calls cyg_drv_dsr_lock() and does not provide a
>> way to call cyg_drv_dsr_unlock() is broken.  If this is the case, it's no
>> wonder that your system comes to a halt when a NTP update comes in.
>>
>> The 'set_current_time()' function is not part of eCos, so it's difficult
>> to analyze this much further.
>
> Sorry, I missed this in .../io/wallclock/current/src/wallclock.cxx
>
> Nonetheless, that's where I'd start looking at the problem.  As mentioned
> in the note you quoted, this function should be using a mutex for
> protection,
> not DSR locking.

Please try the attached patch (untested) and let me know if it helps.

>
>>
>>>
>>> Thanks            ...Laurie:{)
>>>
>>> -----Original Message-----
>>> From: ecos-discuss-owner@ecos.sourceware.org
>>> [mailto:ecos-discuss-owner@ecos.sourceware.org]On Behalf Of Laurie
>>> Gellatly
>>> Sent: Friday, 12 January 2007 9:47 PM
>>> To: eCos discussion
>>> Subject: RE: [ECOS] [Fwd: Re: [ECOS] sntp problems]
>>>
>>>
>>> Thanks Jonathan,
>>> That looks promising. I'll check it out.
>>>
>>>             ...Laurie:{)
>>>
>>> -----Original Message-----
>>> From: ecos-discuss-owner@ecos.sourceware.org
>>> [mailto:ecos-discuss-owner@ecos.sourceware.org]On Behalf Of Jonathan
>>> Larmour
>>> Sent: Friday, 12 January 2007 1:44 AM
>>> To: eCos discussion
>>> Subject: [ECOS] [Fwd: Re: [ECOS] sntp problems]
>>>
>>>
>>> The attached post was mis-directed. - Jifl
>>>
>>>
>>> --
>>> Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
>>> and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
>>>
>>>
>>
>>
>
>


--
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss



More information about the Ecos-discuss mailing list