All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] Watchdog process
@ 2009-01-30  5:28 Daniel Adams
  2009-01-30 13:51 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Adams @ 2009-01-30  5:28 UTC (permalink / raw)
  To: xenomai

[-- Attachment #1: Type: text/plain, Size: 812 bytes --]

Hi,

I've written a watchdog process which expects a token (semaphore) to be
touch every Nms by waiting on the semaphore with a timeout. If the task
timeouts out on the semaphore I need it to cause a hardware reset. Previous
RTOSes I've used have had direct access to the COP/Watchdog timer hardware
where the process would tickle the COP or just spin wait for reset once an
deadline had been missed. I understand that I can get similar behaviour by
essentially starving the Linux kernel of processor time which causes the NMI
watchdog to not be tickled, but this timeout is in the order of seconds. The
application I'm working on is safety critical and needs to cause a system
reset in < 1 sec.

Is this possible with Xenomai? If so, can some one point me the direction of
how to achieve it.

Thanks

Dan Adams

[-- Attachment #2: Type: text/html, Size: 859 bytes --]

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

* Re: [Xenomai-help] Watchdog process
  2009-01-30  5:28 [Xenomai-help] Watchdog process Daniel Adams
@ 2009-01-30 13:51 ` Gilles Chanteperdrix
  0 siblings, 0 replies; 2+ messages in thread
From: Gilles Chanteperdrix @ 2009-01-30 13:51 UTC (permalink / raw)
  To: Daniel Adams; +Cc: xenomai

Daniel Adams wrote:
> Hi,
> 
> I've written a watchdog process which expects a token (semaphore) to be
> touch every Nms by waiting on the semaphore with a timeout. If the task
> timeouts out on the semaphore I need it to cause a hardware reset. Previous
> RTOSes I've used have had direct access to the COP/Watchdog timer hardware

It's funny, because people generally consider memory protection as a
good thing. In any case, you can use /dev/mem to access your hardware in
user-space, our use iopl/ioperm and inb/outb if it is ISA hardware.

> where the process would tickle the COP or just spin wait for reset once an
> deadline had been missed. I understand that I can get similar behaviour by
> essentially starving the Linux kernel of processor time which causes the NMI
> watchdog to not be tickled, but this timeout is in the order of seconds. The
> application I'm working on is safety critical and needs to cause a system
> reset in < 1 sec.
> 
> Is this possible with Xenomai? If so, can some one point me the direction of
> how to achieve it.

You could do this outside of xenomai: implement a Linux watchdog driver
for your watchdog hardware. Then you can use the existing Linux watchdog
program, or you can modify it to try and get the semaphore. Running the
watchdog program as a plain Linux task is a better idea as running it as
a Xenomai task, because this way, if ever Xenomai starves Linux, you
will get the expected behaviour.

-- 
					    Gilles.


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

end of thread, other threads:[~2009-01-30 13:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-30  5:28 [Xenomai-help] Watchdog process Daniel Adams
2009-01-30 13:51 ` Gilles Chanteperdrix

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.