public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Sergei Gavrikov <sergei.gavrikov@gmail.com>
To: Laurie Gellatly <laurie.gellatly@netic.com>
Cc: 'eCos discuss-list' <ecos-discuss@ecos.sourceware.org>
Subject: Re: [ECOS] LPC2XXX watchdog feeds and interrupts
Date: Mon, 26 Oct 2009 20:40:00 -0000	[thread overview]
Message-ID: <20091026203636.GA10662@sg-laptop> (raw)

On Mon, Oct 26, 2009 at 08:58:19PM +1100, Laurie Gellatly wrote:
> Hi All, I using an ARM 7 (LPC2212) based on an eCosCentric build. It
> appears that watchdog feeds are done with interrupts enabled yet the
> NXP manual warns against leaving interrupts enabled during a feed
> sequence (and I'm pretty sure I've seen the consequences).  Firstly,
> have I missed something? Are interrupts disabled and I just don't
> see where when I call watchdog_reset() OR should I be adding
> cyg_interrupt_disable() and cyg_interrupt_enable() calls around the
> feed sequence in watchdog_lpc2xxx.cxx
> 
> Thanks			...Laurie:{)

Hello Laurie,

I found no any global interrupt disabling/enabling workaround for eCos
io/watchdog *::reset. More that the most targets as I could see have a
peace with CPU's watchdog with a single atomic write, but NXP and some
other targets claim two writes (!atomic operation): devs/watchdog/*

Well, NXP points on such a claim, for example, in this application
note
http://www.standardics.nxp.com/support/documents/microcontrollers/pdf/an10414.pdf
and in their other data sheets. Well, may be that is rare condition:
to break two sequenced  writes, but safety is safety :-) Could you
provide a patch for the issue, please`?

IMO, you would add some CDL in devs/watchdog/arm/lpc2xxx/*/*, e.g.
CYGOPT_DEVICES_WATCHDOG_ARM_LPC2XXX_RESET_SAFE to wrap that reset,
well, to add something likes the below

    int old;
    HAL_DISABLE_INTERRUPTS( old );
    /* Feed magic values to reset the watchdog. */
    /* ... */
    HAL_RESTORE_INTERRUPTS( old );

But, as I could understand, you pointed on eCosCentric build.

HTH

Sergei

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

             reply	other threads:[~2009-10-26 20:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-26 20:40 Sergei Gavrikov [this message]
2009-10-26 21:05 ` Laurie Gellatly
2009-10-26 21:34   ` Sergei Gavrikov
  -- strict thread matches above, loose matches on Subject: below --
2009-10-19  9:32 [ECOS] RedBoot image for Olimex LPC-E2294 peter_lanius
2009-10-19 10:42 ` Sergei Gavrikov
2009-10-19 11:42   ` peter_lanius
2009-10-19 13:47     ` Sergei Gavrikov
2009-10-24  9:37       ` [ECOS] RedBoot loading eCOS examples causes PC reboot peter_lanius
2009-10-24 12:38         ` Sergei Gavrikov
     [not found]           ` <738229.12555.qm@web51906.mail.re2.yahoo.com>
2009-10-25 13:20             ` Sergei Gavrikov
2009-10-26  9:58               ` [ECOS] LPC2XXX watchdog feeds and interrupts Laurie Gellatly

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=20091026203636.GA10662@sg-laptop \
    --to=sergei.gavrikov@gmail.com \
    --cc=ecos-discuss@ecos.sourceware.org \
    --cc=laurie.gellatly@netic.com \
    /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 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).