This is the mail archive of the ecos-discuss@sources.redhat.com 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]

Re: Watchdog Device


Is watchdog driver available for MBX evaluation
board(MBX starter kit-MPC860).

Regards,mekala




--- Jonathan Larmour <jlarmour@redhat.com> wrote:
> "Pamulapati, Indrasena (CTS)" wrote:
> > 
> > Hi,
> > 
> > I have a doubt regarding the use of the watchdog
> device.
> > 
> > Can I program a watchdog device to interrupt my
> application after a
> > particular delay i.e., can I use the Watchdog
> device as a delay mechanism
> > instead of using the "delay" system clock provided
> by the OS.
> > 
> > The reason for this is, I need a particular
> application of mine to go to the
> > " wait " state for a time that is lower than the
> tick value I am using. And
> > I dont want to reduce the value of the system
> tick. For example, if I am
> > using a tick value of 10millisec I can make my
> application sleep for only an
> > integral multiple of 10millisec. But I want my
> application to sleep for a
> > time less than 10millisec, say for 10microsec.
> > In this case I can not use the " delay " system
> call provided by eCos
> > because it takes a parameter only in terms of
> ticks.
> 
> You can only interface with the watchdog support
> with C++. See
> io/watchdog/VERSION/include/watchdog.hxx. You need
> to instantiate a
> Cyg_Watchdog_Action object, and then install it.
> 
> But will your watchdog have any finer granularity
> than that? If this is a
> PC, have you written your own hardware watchdog
> driver for some watchdog
> hardware on your board? Because eCos doesn't have
> any for x86, and just
> emulates it with the system clock.
> 
> An alternative (admittedly undocumented) feature is:
> 
> #include <cyg/hal/hal_if.h>
> CYGACC_CALL_IF_DELAY_US(usec);
> 
> which delays for usec microseconds. Also enable
> CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_DELAY_US in your
> eCos configuration.
> 
> Jifl
> -- 
> Red Hat, Rustat House, Clifton Road, Cambridge, UK.
> Tel: +44 (1223) 271062
> Maybe this world is another planet's Hell -Aldous
> Huxley || Opinions==mine


__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/


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