Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Thread

Watchdog and external Interrupt problem

Watchdog and external Interrupt problem

2005-02-27 by itsjustimpossible

Hi
I am nearing the end of our first project with the LPC2294 and need 
to implement the watchdog.

I am pretty sure I have it setup correctly, and with it in its debug 
mode I can cause a jump to the watchDog IRQ routine when I put the 
uP into an endless loop.

As part of its functionality external interrupts are disabled until 
the equipment is set to GO, and this where the problems start. As 
soon as I enable the external interrupt the watchdog timer jumps to 
its ISR. (The external interrupts are set to FIQ and at 8uS 
intervals)

Even with the watchdog timer set to a very very long timeout (i.e. 
ten seconds) as soon as external interrupts are enabled we jump to 
the WatchDog ISR.

With the watchdog set to Off everything else works as expected.
With the watchdog set to On but no external interrupts everything 
works as expected.

When I kick the watchdog I am disabling all the interrupts using the 
VIC. Do I have to jump to system mode and disable the global IRQ and 
FIQ flags? This would probably be too slow...

Has anyone else seen anything like this?
At the moment its driving me nuts.

many thanks
Simon

Re: [lpc2000] Watchdog and external Interrupt problem

2005-02-27 by Robert Adsett

At 03:22 PM 2/27/05 +0000, itsjustimpossible wrote:
>When I kick the watchdog I am disabling all the interrupts using the
>VIC. Do I have to jump to system mode and disable the global IRQ and
>FIQ flags? This would probably be too slow...

What mode are you normally in?  You can't disable interrupts in user mode, 
but there is really no reason to ever be in user mode.

Robert



" 'Freedom' has no meaning of itself.  There are always restrictions,
be they legal, genetic, or physical.  If you don't believe me, try to
chew a radio signal. "

                         Kelvin Throop, III

Re: [lpc2000] Watchdog and external Interrupt problem

2005-02-28 by jane highland

Yes I got fed up too. Get an external watchdog
chip...you want to be able to 'scope' a real reset
signal from something independent of the the LPC chip
when the CPU screws up.

If anything it will let you sleep at night, when
you've got thousands of products out there in the
field.


Jane
 --- itsjustimpossible <simonjh@...> wrote: 

---------------------------------

Hi
I am nearing the end of our first project with the
LPC2294 and need 
to implement the watchdog.

I am pretty sure I have it setup correctly, and with
it in its debug 
mode I can cause a jump to the watchDog IRQ routine
when I put the 
uP into an endless loop.

As part of its functionality external interrupts are
disabled until 
the equipment is set to GO, and this where the
problems start. As 
soon as I enable the external interrupt the watchdog
timer jumps to 
its ISR. (The external interrupts are set to FIQ and
at 8uS 
intervals)

Even with the watchdog timer set to a very very long
timeout (i.e. 
ten seconds) as soon as external interrupts are
enabled we jump to 
the WatchDog ISR.

With the watchdog set to Off everything else works as
expected.
With the watchdog set to On but no external interrupts
everything 
works as expected.

When I kick the watchdog I am disabling all the
interrupts using the 
VIC. Do I have to jump to system mode and disable the
global IRQ and 
FIQ flags? This would probably be too slow...

Has anyone else seen anything like this?
At the moment its driving me nuts.

many thanks
Simon




Yahoo! Groups Sponsor  ADVERTISEMENT
 

---------------------------------
Yahoo! Groups Links

   To visit your group on the web, go to:
http://groups.yahoo.com/group/lpc2000/
 
   To unsubscribe from this group, send an email to:
lpc2000-unsubscribe@yahoogroups.com
 
   Your use of Yahoo! Groups is subject to the Yahoo!
Terms of Service.
 

Send instant messages to your online friends http://uk.messenger.yahoo.com

Re: [lpc2000] Watchdog and external Interrupt problem

2005-03-01 by Onestone

It sounds like you have a watchdog flag already lodged, ie even though 
not enabled the watchdog still runs, and, as soon as it becomes enabled 
, with ints enabled the old pending flag is executed. Try clearing any 
pending flags before enabling the watchdog.

Al

jane highland wrote:
Show quoted textHide quoted text
> Yes I got fed up too. Get an external watchdog
> chip...you want to be able to 'scope' a real reset
> signal from something independent of the the LPC chip
> when the CPU screws up.
>
> If anything it will let you sleep at night, when
> you've got thousands of products out there in the
> field.
>
>
> Jane
> --- itsjustimpossible <simonjh@...> wrote:
>
> ---------------------------------
>
> Hi
> I am nearing the end of our first project with the
> LPC2294 and need
> to implement the watchdog.
>
> I am pretty sure I have it setup correctly, and with
> it in its debug
> mode I can cause a jump to the watchDog IRQ routine
> when I put the
> uP into an endless loop.
>
> As part of its functionality external interrupts are
> disabled until
> the equipment is set to GO, and this where the
> problems start. As
> soon as I enable the external interrupt the watchdog
> timer jumps to
> its ISR. (The external interrupts are set to FIQ and
> at 8uS
> intervals)
>
> Even with the watchdog timer set to a very very long
> timeout (i.e.
> ten seconds) as soon as external interrupts are
> enabled we jump to
> the WatchDog ISR.
>
> With the watchdog set to Off everything else works as
> expected.
> With the watchdog set to On but no external interrupts
> everything
> works as expected.
>
> When I kick the watchdog I am disabling all the
> interrupts using the
> VIC. Do I have to jump to system mode and disable the
> global IRQ and
> FIQ flags? This would probably be too slow...
>
> Has anyone else seen anything like this?
> At the moment its driving me nuts.
>
> many thanks
> Simon
>
>
>
>
> Yahoo! Groups Sponsor  ADVERTISEMENT
>
>
> ---------------------------------
> Yahoo! Groups Links
>
>    To visit your group on the web, go to:
> http://groups.yahoo.com/group/lpc2000/
>
>    To unsubscribe from this group, send an email to:
> lpc2000-unsubscribe@yahoogroups.com
>
>    Your use of Yahoo! Groups is subject to the Yahoo!
> Terms of Service.
>
>
> Send instant messages to your online friends 
> http://uk.messenger.yahoo.com
>
> Yahoo! Groups Sponsor
> ADVERTISEMENT
> <http://us.ard.yahoo.com/SIG=129n7ip18/M=298184.6018725.7038619.3001176/D=groups/S=1706554205:HM/EXP=1109717862/A=2593423/R=0/SIG=11el9gslf/*http://www.netflix.com/Default?mqso=60190075> 
>
>
>
> ------------------------------------------------------------------------
> Yahoo! Groups Links
>
>     * To visit your group on the web, go to:
>       http://groups.yahoo.com/group/lpc2000/
>        
>     * To unsubscribe from this group, send an email to:
>       lpc2000-unsubscribe@yahoogroups.com
>       <mailto:lpc2000-unsubscribe@yahoogroups.com?subject=Unsubscribe>
>        
>     * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
>       Service <http://docs.yahoo.com/info/terms/>.
>
>
>------------------------------------------------------------------------
>
>No virus found in this incoming message.
>Checked by AVG Anti-Virus.
>Version: 7.0.300 / Virus Database: 266.5.2 - Release Date: 28/02/2005
>  
>

Re: Watchdog and external Interrupt problem

2005-03-15 by itsjustimpossible

Thanks to all those who replied. Sorry for the delay in replying, 
finally got back to working on this again.

Just a quick question, yes I am in User mode all the time which 
means doing a software interrupt to change mode to disable/enable 
interrupts. This is all a bit too slow.

We are not using an RTOS, so are there any drawbacks with staying in 
Supervisor mode as you suggest?

many thanks
Simon

--- In lpc2000@yahoogroups.com, Robert Adsett <subscriptions@a...> 
wrote:
> At 03:22 PM 2/27/05 +0000, itsjustimpossible wrote:
> >When I kick the watchdog I am disabling all the interrupts using 
the
> >VIC. Do I have to jump to system mode and disable the global IRQ 
and
> >FIQ flags? This would probably be too slow...
> 
> What mode are you normally in?  You can't disable interrupts in 
user mode, 
> but there is really no reason to ever be in user mode.
> 
> Robert
> 
> 
> 
> " 'Freedom' has no meaning of itself.  There are always 
restrictions,
> be they legal, genetic, or physical.  If you don't believe me, try 
to
Show quoted textHide quoted text
> chew a radio signal. "
> 
>                          Kelvin Throop, III

Re: [lpc2000] Re: Watchdog and external Interrupt problem

2005-03-15 by Robert Adsett

At 07:43 PM 3/15/05 +0000, itsjustimpossible wrote:
>Thanks to all those who replied. Sorry for the delay in replying,
>finally got back to working on this again.
>
>Just a quick question, yes I am in User mode all the time which
>means doing a software interrupt to change mode to disable/enable
>interrupts. This is all a bit too slow.
>
>We are not using an RTOS, so are there any drawbacks with staying in
>Supervisor mode as you suggest?

Actually I'd suggest system mode.  The only difference between User and 
System mode is (AFAIK) that in system mode you can control the interrupt 
and mode bits.  RTOS or not, on this small a micro I see no benefit to user 
mode.

Robert

" 'Freedom' has no meaning of itself.  There are always restrictions,   be 
they legal, genetic, or physical.  If you don't believe me, try to chew a 
radio signal. "  -- Kelvin Throop, III
http://www.aeolusdevelopment.com/

Re: Watchdog and external Interrupt problem

2005-03-16 by itsjustimpossible

Thanks, I will keep to system mode from now on.

A bit embaressing, but I seem to be having all kinds of trouble 
getting the watchdog to do anything sensible.

I don't suppose anyone knows of some example code to give me an idea 
of where I am going wrong?

I have scrapped all the watchdog handler bits I have done so far and 
am starting again. I really wish I had gone with an external one, 
but its all too late now. The boards are done...

many thanks
Simon

--- In lpc2000@yahoogroups.com, Robert Adsett <subscriptions@a...> 
> Actually I'd suggest system mode.  The only difference between 
User and 
> System mode is (AFAIK) that in system mode you can control the 
interrupt 
> and mode bits.  RTOS or not, on this small a micro I see no 
benefit to user 
Show quoted textHide quoted text
> mode.
> 
> Robert

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.