From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Daniel Adams <dadams81@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] Watchdog process
Date: Fri, 30 Jan 2009 14:51:08 +0100 [thread overview]
Message-ID: <498305CC.9060601@domain.hid> (raw)
In-Reply-To: <ba9b368a0901292128x57de0b4dj4cb701db49bb2059@domain.hid>
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.
prev parent reply other threads:[~2009-01-30 13:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-30 5:28 [Xenomai-help] Watchdog process Daniel Adams
2009-01-30 13:51 ` Gilles Chanteperdrix [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=498305CC.9060601@domain.hid \
--to=gilles.chanteperdrix@xenomai.org \
--cc=dadams81@domain.hid \
--cc=xenomai@xenomai.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.