public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* RE: [ECOS] Watchdog Device
@ 2001-05-17  4:08 Doug Fraser
  0 siblings, 0 replies; 6+ messages in thread
From: Doug Fraser @ 2001-05-17  4:08 UTC (permalink / raw)
  To: 'Jonathan Larmour', mekala natarajan
  Cc: Pamulapati, Indrasena (CTS), ecos-discuss

There is a watchdog in the mpc860, you just have to write
a service routine to keep it from barking. The problem with
the MPC8xx watchdog is that you get only one chance to set
it up at boot time. If you ever disable it, the only way to
re-enable it is through a hardware reset.

If it gets in the way of testing, then disable it in that
load, then remove the code that disables it in your non-test
release.

The details are in the SYPCR register. In my MPC850 manual,
that is section 10.4.3 at page 10-8

Doug

> -----Original Message-----
> From: Jonathan Larmour [ mailto:jlarmour@redhat.com ]
> Sent: Thursday, May 17, 2001 3:11 AM
> To: mekala natarajan
> Cc: Pamulapati, Indrasena (CTS); ecos-discuss@sources.redhat.com
> Subject: Re: [ECOS] Watchdog Device
> 
> 
> mekala natarajan wrote:
> > 
> > Is watchdog driver available for MBX evaluation
> > board(MBX starter kit-MPC860).
> 
> There is no hardware watchdog driver. One is emulated by the 
> kernel using
> the standard clock however. Care to write one?
> 
> 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
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ECOS] Watchdog Device
  2001-05-15  1:44   ` mekala natarajan
@ 2001-05-17  0:10     ` Jonathan Larmour
  0 siblings, 0 replies; 6+ messages in thread
From: Jonathan Larmour @ 2001-05-17  0:10 UTC (permalink / raw)
  To: mekala natarajan; +Cc: Pamulapati, Indrasena (CTS), ecos-discuss

mekala natarajan wrote:
> 
> Is watchdog driver available for MBX evaluation
> board(MBX starter kit-MPC860).

There is no hardware watchdog driver. One is emulated by the kernel using
the standard clock however. Care to write one?

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ECOS] Watchdog Device
  2001-05-14 10:54 ` Jonathan Larmour
@ 2001-05-15  1:44   ` mekala natarajan
  2001-05-17  0:10     ` Jonathan Larmour
  0 siblings, 1 reply; 6+ messages in thread
From: mekala natarajan @ 2001-05-15  1:44 UTC (permalink / raw)
  To: Jonathan Larmour, Pamulapati, Indrasena (CTS); +Cc: ecos-discuss

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/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ECOS] Watchdog Device
  2001-05-13 21:28 Pamulapati, Indrasena (CTS)
@ 2001-05-14 10:54 ` Jonathan Larmour
  2001-05-15  1:44   ` mekala natarajan
  0 siblings, 1 reply; 6+ messages in thread
From: Jonathan Larmour @ 2001-05-14 10:54 UTC (permalink / raw)
  To: Pamulapati, Indrasena (CTS); +Cc: ecos-discuss

"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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [ECOS] Watchdog Device
@ 2001-05-13 21:42 Pamulapati, Indrasena (CTS)
  0 siblings, 0 replies; 6+ messages in thread
From: Pamulapati, Indrasena (CTS) @ 2001-05-13 21:42 UTC (permalink / raw)
  To: ecos-discuss

> 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.
> 
> Can anyone give me some idea about how to solve this particular problem.
> Can I solve using a Watchdog device.
> 
> Note: I am using an i386 processor that has a timer clock of frequency
> 1.1987Mhz.
> 
> Regards,
> Indrasena
> 
> 
> 
> 
This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information.
If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. 
Any unauthorised review, use, disclosure, dissemination, forwarding, printing or copying of this email or any action taken in reliance on this e-mail is strictly 
prohibited and may be unlawful.

		Visit us at http://www.cognizant.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [ECOS] Watchdog Device
@ 2001-05-13 21:28 Pamulapati, Indrasena (CTS)
  2001-05-14 10:54 ` Jonathan Larmour
  0 siblings, 1 reply; 6+ messages in thread
From: Pamulapati, Indrasena (CTS) @ 2001-05-13 21:28 UTC (permalink / raw)
  To: ecos-discuss

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.

Can anyone give me some idea about how to solve this particular problem. Can
I solve using a Watchdog device.

Note: I am using an i386 processor that has a timer clock of frequency
1.1987Mhz.

Regards,
Indrasena




This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information.
If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. 
Any unauthorised review, use, disclosure, dissemination, forwarding, printing or copying of this email or any action taken in reliance on this e-mail is strictly 
prohibited and may be unlawful.

		Visit us at http://www.cognizant.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2001-05-17  4:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-17  4:08 [ECOS] Watchdog Device Doug Fraser
  -- strict thread matches above, loose matches on Subject: below --
2001-05-13 21:42 Pamulapati, Indrasena (CTS)
2001-05-13 21:28 Pamulapati, Indrasena (CTS)
2001-05-14 10:54 ` Jonathan Larmour
2001-05-15  1:44   ` mekala natarajan
2001-05-17  0:10     ` Jonathan Larmour

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).