This is the mail archive of the ecos-patches@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: AT91 watchdog timer controller driver


> Is it possible to measure the rate of this clock at boot time?  By
> comparing its rate against that of a more accurate clock, for example.

You can calibrate it against the crystal which is something i could
add. I think there is even hardware to do it. But the problem is you
can only configure the watchdog once. So temperate calibration is not
possible. Im currently working on a device which can experiance 30
degree centigrade temperature changes in the space of a couple of
minutes. The slow clock can change considerably with such a temperate
change. So you just have to be awair of the problem when you configure
the watchdog and decide how to trigger it. The watchdog can also be
quite generous, allowing timeouts of up to 6s when the clock is
running at the nomincal 32768Hz.
 
> If not, I think you should consider adding a sufficiently a large fudge
> factor so that the watchdog never goes off early.  Presumably the
> datasheet provides minimum and maximum values for the rate of this slow
> clock?

It gives min,max, but at a specific working voltage. The AT91SAM7S is
ideal for being powered by battery and i've seen it keep running below
the specified minimum voltage, when i expect the data sheets clock
charactoristics are no longer valid.

I don't think all these problems can be solved but i have documented
the unreliability in the CDL so users of the watchdog should be awair
of the potential problems. If you are woried about false resets set it
to 6s and trigger it every 1s. I don't expect it will be ever that far
out. 

You also have the option of disabling the processor reset and getting
an interrupt instead which can fire an action.

        Andrew


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]