Yahoo Groups archive

Lpc2000

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

Thread

Re: spurious interrupts on LPC

Re: spurious interrupts on LPC

2006-03-14 by Jayasooriah

Dear Robert,

In the FAQ you referred to, on "ARM7DTMI-S Core", to the FAQ:

"Can spurious interrupts occur in the LPC200?",

Your answer is:

"Yes, spurious interrupts can occur in any ARM7 device that has implemented 
the ARM Primecell Vectored Interrupt Controller (VIC)."

I tried looking for a reference to this in the ARM site but cannot find any.

A search on "spurious" at the ARM web site yields 11 hits but these appear 
not relevant to the VIC and spurious interrupt problem with the ARM design 
that you seem to allude us to.

I also did a brief search for information on the web relating to spurious 
interrupts, and all the examples seem to point to LPC one way or another.

A spurious interrupt is a hardware interrupt which is generated by system 
errors (http://www.answers.com/topic/interrupt-1), and systems with 
spurious interrupts in general do not meet compliance requirements.

Please clarify:

1/  Is this spurious interrupt problem an error in LPC implementation of 
VIC or is it an error in ARM Primecell VIC specifications itself?

2/  Can you tell us if there are any other ARM cores with VIC that also 
suffer from spurious interrupts problem that the LPC suffers from?

Kind regards,

Jaya

PS:  I realise there has been discussion previously on spurious interrupts, 
but none seem to throw any light on whether this is a problem specific to 
LPC or it has to do with with ARM VIC design itself.

--- In lpc2000@yahoogroups.com, "philips_apps" <philips_apps@...> wrote:
 >
 > Hi,
 >
 > have a look at the FAQ here:
 >
 > http://www.standardics.philips.com/support/faq/microcontrollers/
 >
 > I also added a link in the link section named
 > "Philips FAQ for LPC2000 devices"
 >
 > Regards, Robert

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

Re: [lpc2000] Re: spurious interrupts on LPC

2006-03-14 by Marko Pavlin (home)

Just a reference:
http://www.standardics.philips.com/support/documents/microcontrollers/pdf/an10414.pdf


Jayasooriah wrote:
Show quoted textHide quoted text
> Dear Robert,
>
> In the FAQ you referred to, on "ARM7DTMI-S Core", to the FAQ:
>
> "Can spurious interrupts occur in the LPC200?",
>
> Your answer is:
>
> "Yes, spurious interrupts can occur in any ARM7 device that has 
> implemented
> the ARM Primecell Vectored Interrupt Controller (VIC)."
>
> I tried looking for a reference to this in the ARM site but cannot 
> find any.
>
> A search on "spurious" at the ARM web site yields 11 hits but these 
> appear
> not relevant to the VIC and spurious interrupt problem with the ARM 
> design
> that you seem to allude us to.
>
> I also did a brief search for information on the web relating to spurious
> interrupts, and all the examples seem to point to LPC one way or another.
>
> A spurious interrupt is a hardware interrupt which is generated by system
> errors (http://www.answers.com/topic/interrupt-1), 
> <http://www.answers.com/topic/interrupt-1%29,> and systems with
> spurious interrupts in general do not meet compliance requirements.
>
> Please clarify:
>
> 1/  Is this spurious interrupt problem an error in LPC implementation of
> VIC or is it an error in ARM Primecell VIC specifications itself?
>
> 2/  Can you tell us if there are any other ARM cores with VIC that also
> suffer from spurious interrupts problem that the LPC suffers from?
>
> Kind regards,
>
> Jaya
>
> PS:  I realise there has been discussion previously on spurious 
> interrupts,
> but none seem to throw any light on whether this is a problem specific to
> LPC or it has to do with with ARM VIC design itself.
>
> --- In lpc2000@yahoogroups.com, "philips_apps" <philips_apps@...> wrote:
> >
> > Hi,
> >
> > have a look at the FAQ here:
> >
> > http://www.standardics.philips.com/support/faq/microcontrollers/
> >
> > I also added a link in the link section named
> > "Philips FAQ for LPC2000 devices"
> >
> > Regards, Robert
>
> Send instant messages to your online friends 
> http://au.messenger.yahoo.com
>
>
> SPONSORED LINKS
> Microcontrollers 
> <http://groups.yahoo.com/gads?t=ms&k=Microcontrollers&w1=Microcontrollers&w2=Microprocessor&w3=Intel+microprocessors&w4=Pic+microcontrollers&c=4&s=95&.sig=mfaAujKZXA2Z_vxre9sGnQ> 
> 	Microprocessor 
> <http://groups.yahoo.com/gads?t=ms&k=Microprocessor&w1=Microcontrollers&w2=Microprocessor&w3=Intel+microprocessors&w4=Pic+microcontrollers&c=4&s=95&.sig=9jjd2D3GOLIESVQssLmLsA> 
> 	Intel microprocessors 
> <http://groups.yahoo.com/gads?t=ms&k=Intel+microprocessors&w1=Microcontrollers&w2=Microprocessor&w3=Intel+microprocessors&w4=Pic+microcontrollers&c=4&s=95&.sig=OMnZuqMZX95mgutt4B-tDw> 
>
> Pic microcontrollers 
> <http://groups.yahoo.com/gads?t=ms&k=Pic+microcontrollers&w1=Microcontrollers&w2=Microprocessor&w3=Intel+microprocessors&w4=Pic+microcontrollers&c=4&s=95&.sig=Malspbd0T4Rq3M4Q0nHrfw> 
>
>
>
> YAHOO! GROUPS LINKS
>
>     *  Visit your group "lpc2000
>       <http://groups.yahoo.com/group/lpc2000>" on the web.
>        
>     *  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/>.
>
>
>

Re: spurious interrupts on LPC

2006-03-14 by Jayasooriah

Hi Marko,

I read the AN a few times -- in section 3.1, in explaining one source of 
spurious interrupts when feeding watchdog timer, it says:

"The disabling of interrupts before the feed sequence may lead to the 
occurrence of spurious interrupts."

OS'es disable and enable interrupts all the time.  They however do not have 
to deal with spurious interrupts as a consequence.  Interrupts can be lost 
as a result due to folding, but spurious interrupts?  In the case of LPC, 
this AN suggests the OS must cope with spurious interrupts if it disables 
and enables interrupts.

This begs the question: is this erroneous behaviour LPC specific, or does 
it affect any other (all?) ARM VIC implementations?

The AN suggests the latter is the case but I cannot find any documentation 
relating to ARM Primecell VIC specifications that supports this.

Jaya

--- In lpc2000@yahoogroups.com, "Marko Pavlin (home)" <mp@...> wrote:
 >
 > Just a reference:
 > 
http://www.standardics.philips.com/support/documents/microcontrollers/pdf/an10414.pdf
 > 

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

Re: spurious interrupts on LPC

2006-03-14 by ian.scanlon

Perhaps this will help:
http://www.arm.com/contact_us/

--- In lpc2000@yahoogroups.com, Jayasooriah <jayasooriah@...> wrote:
>
> Hi Marko,
> 
> I read the AN a few times -- in section 3.1, in explaining one 
source of 
> spurious interrupts when feeding watchdog timer, it says:
> 
> "The disabling of interrupts before the feed sequence may lead to 
the 
> occurrence of spurious interrupts."
> 
> OS'es disable and enable interrupts all the time.  They however do 
not have 
> to deal with spurious interrupts as a consequence.  Interrupts can 
be lost 
> as a result due to folding, but spurious interrupts?  In the case 
of LPC, 
> this AN suggests the OS must cope with spurious interrupts if it 
disables 
> and enables interrupts.
> 
> This begs the question: is this erroneous behaviour LPC specific, 
or does 
> it affect any other (all?) ARM VIC implementations?
> 
> The AN suggests the latter is the case but I cannot find any 
documentation 
> relating to ARM Primecell VIC specifications that supports this.
> 
> Jaya
> 
> --- In lpc2000@yahoogroups.com, "Marko Pavlin (home)" <mp@> wrote:
>  >
>  > Just a reference:
>  > 
> 
http://www.standardics.philips.com/support/documents/microcontrollers/
pdf/an10414.pdf
>  > 
> 
> Send instant messages to your online friends 
http://au.messenger.yahoo.com
>

RE: [lpc2000] Re: spurious interrupts on LPC

2006-03-14 by Paul Curtis

I thought this witch hunt was over, but I see it's alive again. 

> In the FAQ you referred to, on "ARM7DTMI-S Core", to the FAQ:
> 
> "Can spurious interrupts occur in the LPC200?",
> 
> Your answer is:
> 
> "Yes, spurious interrupts can occur in any ARM7 device that 
> has implemented the ARM Primecell Vectored Interrupt 
> Controller (VIC)."
> 
> I tried looking for a reference to this in the ARM site but 
> cannot find any.

They might not wish to air this in public.  How about trying to find an
instruction set definition of ARM on the ARM site?

> A search on "spurious" at the ARM web site yields 11 hits but 
> these appear not relevant to the VIC and spurious interrupt 
> problem with the ARM design that you seem to allude us to.

The web is an unreliable research tool.

> I also did a brief search for information on the web relating 
> to spurious interrupts, and all the examples seem to point to 
> LPC one way or another.

See what I mean?

> A spurious interrupt is a hardware interrupt which is 
> generated by system errors 
> (http://www.answers.com/topic/interrupt-1), and systems with 
> spurious interrupts in general do not meet compliance requirements.

Ok, so there exists at least one definition on at least one page of at
least one web site that matches with your requirement of what "spurious
interrupt" means.  In the case cited by Philips, the spurious interrupt
does not stem from system errors, there is a specific issue in the
ARM7TDMI-S which has been given the nomenclature "spurious interrupt"
for want of a better name.

> Please clarify:
> 
> 1/  Is this spurious interrupt problem an error in LPC 
> implementation of VIC or is it an error in ARM Primecell VIC 
> specifications itself?

It is an issue when interrupts are disabled asynchronously to the
interrupt source which then raises an interrupt.  The interrupt is
disabled, but the IRQ is taken.

> 2/  Can you tell us if there are any other ARM cores with VIC 
> that also suffer from spurious interrupts problem that the 
> LPC suffers from?

Why should Robert do your research on other processors?

It is not just the VIC.  The AT91SAM7 suffers the same with the AIC and
the MAC7100 with the INTC.

Don't believe me?  I wouldn't:

http://www.freescale.com/files/32bit/doc/app_note/AN2891.pdf

http://www.atmel.com/dyn/resources/prod_documents/DOC1156.PDF

> PS:  I realise there has been discussion previously on 
> spurious interrupts, but none seem to throw any light on 
> whether this is a problem specific to LPC or it has to do 
> with with ARM VIC design itself.

Who cares?  The issue is well understood and the workaround easy.

--
Paul Curtis, Rowley Associates Ltd   http://www.rowley.co.uk 
CrossWorks for MSP430, ARM, AVR and now MAXQ processors

Re: spurious interrupts on LPC

2006-03-15 by philips_apps

Jaya,

I forwarded your question to the author of the FAQ because I do not 
know the answer out of own experience. The Application Note makes 
the clear statement that it is a general ARM7TDMI - VIC problem.
For those interested in the detailled application note that 
describes how to handle spurious interrupts:
http://www.standardics.philips.com/support/documents/microcontrollers
/pdf/an10414.pdf

We would however greatly appreciate if you would provide your 
knowledge by investigating competitor devices using the VIC and 
telling this community if this is not a general ARM VIC as stated in 
the Application Note by running the same code on a competitor device 
not showing the problem and on a LPC2000 device, showing the issue.

We do experience the problem and consider it a general issue, not 
specific to the LPC2000. If competitors do not mention it, it does 
not mean it does not exist there. 

Best regards, Robert

--- In lpc2000@yahoogroups.com, Jayasooriah <jayasooriah@...> wrote:
>
> Dear Robert,
> 
> In the FAQ you referred to, on "ARM7DTMI-S Core", to the FAQ:
> 
> "Can spurious interrupts occur in the LPC200?",
> 
> Your answer is:
> 
> "Yes, spurious interrupts can occur in any ARM7 device that has 
implemented 
> the ARM Primecell Vectored Interrupt Controller (VIC)."
> 
> I tried looking for a reference to this in the ARM site but cannot 
find any.
> 
> A search on "spurious" at the ARM web site yields 11 hits but 
these appear 
> not relevant to the VIC and spurious interrupt problem with the 
ARM design 
> that you seem to allude us to.
> 
> I also did a brief search for information on the web relating to 
spurious 
> interrupts, and all the examples seem to point to LPC one way or 
another.
> 
> A spurious interrupt is a hardware interrupt which is generated by 
system 
> errors (http://www.answers.com/topic/interrupt-1), and systems 
with 
> spurious interrupts in general do not meet compliance requirements.
> 
> Please clarify:
> 
> 1/  Is this spurious interrupt problem an error in LPC 
implementation of 
> VIC or is it an error in ARM Primecell VIC specifications itself?
> 
> 2/  Can you tell us if there are any other ARM cores with VIC that 
also 
> suffer from spurious interrupts problem that the LPC suffers from?
> 
> Kind regards,
> 
> Jaya
> 
> PS:  I realise there has been discussion previously on spurious 
interrupts, 
> but none seem to throw any light on whether this is a problem 
specific to 
> LPC or it has to do with with ARM VIC design itself.
> 
> --- In lpc2000@yahoogroups.com, "philips_apps" <philips_apps@> 
wrote:
>  >
>  > Hi,
>  >
>  > have a look at the FAQ here:
>  >
>  > http://www.standardics.philips.com/support/faq/microcontrollers/
>  >
>  > I also added a link in the link section named
>  > "Philips FAQ for LPC2000 devices"
>  >
>  > Regards, Robert
> 
> Send instant messages to your online friends 
http://au.messenger.yahoo.com
>

Re: spurious interrupts on LPC

2006-03-15 by roger_lynx

--- In lpc2000@yahoogroups.com, Jayasooriah <jayasooriah@...> wrote:
>
> Hi Marko,
> 
> I read the AN a few times -- in section 3.1, in explaining one
source of 
> spurious interrupts when feeding watchdog timer, it says:

> 
> "The disabling of interrupts before the feed sequence may lead to the 
> occurrence of spurious interrupts."
> 
> OS'es disable and enable interrupts all the time.  
>They however do not have to deal with spurious interrupts as a
>consequence.  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Hi Jayasooriah,

Oh? 
On ARM core with PL 190 VIC, not dealing with this consequence is a
"blissful ignorance", IMHO.

>Interrupts can be lost 
> as a result due to folding, but spurious interrupts?  In the case of
LPC, 
> this AN suggests the OS must cope with spurious interrupts if it
disables 
> and enables interrupts.

Correct. 
Read this FAQ first: http://www.arm.com/support/faqip/3677.html
This is the original source. Philips included this info in their
latest LPC2148 UM, very helpful.
 
> This begs the question: is this erroneous behaviour LPC specific, or
does 
> it affect any other (all?) ARM VIC implementations?

ARM's VIC Prime Cell PL 190, see document "ARM DDI 0181C", and Errata
01.This document can be found on www.arm.com. 

LPC 2000 is an ARMv4T (ATM7) with VIC PL190. This mis-behavior is
specific to ARM7 core(according to ARM). 
There are other interrupt controllers for ARM7-based MCUs (Atmel,
Freescale, ST, etc.). I do not know how they address this
architectural flaw of spurious interrupts. I'd like to know.
 
> The AN suggests the latter is the case but I cannot find any
documentation 
> relating to ARM Primecell VIC specifications that supports this.
                                               ^^^^^^^^^^^^^^^^^^
What do you mean by "that supports this"?

After reading 'this': http://www.arm.com/support/faqip/3677.html,
'that' becomes clearer. 
;-)

Take care.

Roger

> 
> Jaya
> 
> --- In lpc2000@yahoogroups.com, "Marko Pavlin (home)" <mp@> wrote:
>  >
>  > Just a reference:
>  > 
>
http://www.standardics.philips.com/support/documents/microcontrollers/pdf/an10414.pdf
>  > 
> 
> Send instant messages to your online friends
http://au.messenger.yahoo.com
>

Re: spurious interrupts on LPC

2006-03-15 by roger_lynx

--- In lpc2000@yahoogroups.com, "philips_apps" <philips_apps@...> wrote:
>
> Jaya,
> 
> I forwarded your question to the author of the FAQ because I do not 
> know the answer out of own experience. The Application Note makes 
> the clear statement that it is a general ARM7TDMI - VIC problem.
> For those interested in the detailled application note that 
> describes how to handle spurious interrupts:
> http://www.standardics.philips.com/support/documents/microcontrollers
> /pdf/an10414.pdf
> 
> We would however greatly appreciate if you would provide your 
> knowledge by investigating competitor devices using the VIC and 
> telling this community if this is not a general ARM VIC as stated in 
> the Application Note by running the same code on a competitor device 
> not showing the problem and on a LPC2000 device, showing the issue.

Hi Robert,

That is a fair challenge.

> We do experience the problem and consider it a general issue, not 
> specific to the LPC2000. If competitors do not mention it, it does 
> not mean it does not exist there. 

Right. And if ARM says: 
"If an interrupt is received by the core during execution of an
instruction that disables interrupts, the ARM7 family will still take
the interrupt. This occurs for both IRQ and FIQ interrupts."

The question is, since the pipeline is three-staged, at which point
the interrupt (IRQ/IFQ) is being sampled after fetch, decode or
execute cycle? I would imply int. sampling happens after execute.
Would someone clarify this ARM statement, please?
Thanks.

Best regards

Roger
Show quoted textHide quoted text
> 
> Best regards, Robert
> 
> --- In lpc2000@yahoogroups.com, Jayasooriah <jayasooriah@> wrote:
> >
> > Dear Robert,
> > 
> > In the FAQ you referred to, on "ARM7DTMI-S Core", to the FAQ:
> > 
> > "Can spurious interrupts occur in the LPC200?",
> > 
> > Your answer is:
> > 
> > "Yes, spurious interrupts can occur in any ARM7 device that has 
> implemented 
> > the ARM Primecell Vectored Interrupt Controller (VIC)."
> > 
> > I tried looking for a reference to this in the ARM site but cannot 
> find any.
> > 
> > A search on "spurious" at the ARM web site yields 11 hits but 
> these appear 
> > not relevant to the VIC and spurious interrupt problem with the 
> ARM design 
> > that you seem to allude us to.
> > 
> > I also did a brief search for information on the web relating to 
> spurious 
> > interrupts, and all the examples seem to point to LPC one way or 
> another.
> > 
> > A spurious interrupt is a hardware interrupt which is generated by 
> system 
> > errors (http://www.answers.com/topic/interrupt-1), and systems 
> with 
> > spurious interrupts in general do not meet compliance requirements.
> > 
> > Please clarify:
> > 
> > 1/  Is this spurious interrupt problem an error in LPC 
> implementation of 
> > VIC or is it an error in ARM Primecell VIC specifications itself?
> > 
> > 2/  Can you tell us if there are any other ARM cores with VIC that 
> also 
> > suffer from spurious interrupts problem that the LPC suffers from?
> > 
> > Kind regards,
> > 
> > Jaya
> > 
> > PS:  I realise there has been discussion previously on spurious 
> interrupts, 
> > but none seem to throw any light on whether this is a problem 
> specific to 
> > LPC or it has to do with with ARM VIC design itself.
> > 
> > --- In lpc2000@yahoogroups.com, "philips_apps" <philips_apps@> 
> wrote:
> >  >
> >  > Hi,
> >  >
> >  > have a look at the FAQ here:
> >  >
> >  > http://www.standardics.philips.com/support/faq/microcontrollers/
> >  >
> >  > I also added a link in the link section named
> >  > "Philips FAQ for LPC2000 devices"
> >  >
> >  > Regards, Robert
> > 
> > Send instant messages to your online friends 
> http://au.messenger.yahoo.com
> >
>

Re: spurious interrupts on LPC

2006-03-15 by roger_lynx

--- In lpc2000@yahoogroups.com, "Paul Curtis" <plc@...> wrote:
>
> I thought this witch hunt was over, but I see it's alive again. 
> 
...
> They might not wish to air this in public.  

It is there, Paul. 
And they might not want to air it.

> How about trying to find an

> instruction set definition of ARM on the ARM site?

Well, that could cut in "the other revenues", perhaps?:-)
Wanna get 13 MB pdf of ARM ARM, *free*? 
Let me know.

 
> > A search on "spurious" at the ARM web site yields 11 hits but 
> > these appear not relevant to the VIC and spurious interrupt 
> > problem with the ARM design that you seem to allude us to.
> 
> The web is an unreliable research tool.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
But it is nearly instant. :-)
I would not jump to conclusions about reliability, yet. 
It is a pilot's error...it is there (www.arm.com), I found it in 5
seconds. 
Strike one.
 
> > I also did a brief search for information on the web relating 
> > to spurious interrupts, and all the examples seem to point to 
> > LPC one way or another.
> 
> See what I mean?

Strike two.

BS. 
It is well documented, comparing with the "other stuff".
Start with this forum, please. 

When you learn a new word, isn't amazing how "suddenly" the new word
jumps at you everywhere you go? 


> 
> > A spurious interrupt is a hardware interrupt which is 
> > generated by system errors 
> > (http://www.answers.com/topic/interrupt-1), and systems with 
> > spurious interrupts in general do not meet compliance requirements.

So? 
What's your point? 
BTW, answers.com is not an authority on ARM.
Strike three.
You are out.
;-)
 
> Ok, so there exists at least one definition on at least one page of at
> least one web site that matches with your requirement of what "spurious
> interrupt" means.  In the case cited by Philips, the spurious interrupt
> does not stem from system errors, there is a specific issue in the
> ARM7TDMI-S which has been given the nomenclature "spurious interrupt"
> for want of a better name.

Yes. It is ARM7 "feature" for which three (3) solutions exist. 

[deleted]
> 
> > 2/  Can you tell us if there are any other ARM cores with VIC 
> > that also suffer from spurious interrupts problem that the 
> > LPC suffers from?
> 
> Why should Robert do your research on other processors?

Beats me. 
Why?

Jay, I think more fun would be to kick down a row
of parked "hogs" in front of some biker's bar. 
Try it -- once -- please.
;-)

> 
> It is not just the VIC.  The AT91SAM7 suffers the same with the AIC and
> the MAC7100 with the INTC.
> 
> Don't believe me?  I wouldn't:
> 
> http://www.freescale.com/files/32bit/doc/app_note/AN2891.pdf
> 
> http://www.atmel.com/dyn/resources/prod_documents/DOC1156.PDF
>

Good man! It confirms that it is ARM7 core 'issue'. 

> > PS:  I realise there has been discussion previously on 
> > spurious interrupts, but none seem to throw any light on 
> > whether this is a problem specific to LPC or it has to do 
> > with with ARM VIC design itself.
> 
> Who cares?  The issue is well understood and the workaround easy.

Case closed? 
Closed.

Roger
Show quoted textHide quoted text
> 
> --
> Paul Curtis, Rowley Associates Ltd   http://www.rowley.co.uk 
> CrossWorks for MSP430, ARM, AVR and now MAXQ processors
>

Re: [lpc2000] Re: spurious interrupts on LPC

2006-03-15 by Don Williams

Did a lung tumour on a little 10yo last nite at Kids hosp wmead.
dozens of mets all thru the lung already so it was palliative - lovely young
parents just totally exhausted of emotion, like anaesthetised.
More Ewings Sarc.
We are so lucky to have healthy kids
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
XXOO

----- Original Message ----- 
Show quoted textHide quoted text
From: "roger_lynx" <roger_lynx@...>
To: <lpc2000@yahoogroups.com>
Sent: Wednesday, March 15, 2006 11:35 AM
Subject: [lpc2000] Re: spurious interrupts on LPC


> --- In lpc2000@yahoogroups.com, "philips_apps" <philips_apps@...> wrote:
> >
> > Jaya,
> >
> > I forwarded your question to the author of the FAQ because I do not
> > know the answer out of own experience. The Application Note makes
> > the clear statement that it is a general ARM7TDMI - VIC problem.
> > For those interested in the detailled application note that
> > describes how to handle spurious interrupts:
> > http://www.standardics.philips.com/support/documents/microcontrollers
> > /pdf/an10414.pdf
> >
> > We would however greatly appreciate if you would provide your
> > knowledge by investigating competitor devices using the VIC and
> > telling this community if this is not a general ARM VIC as stated in
> > the Application Note by running the same code on a competitor device
> > not showing the problem and on a LPC2000 device, showing the issue.
>
> Hi Robert,
>
> That is a fair challenge.
>
> > We do experience the problem and consider it a general issue, not
> > specific to the LPC2000. If competitors do not mention it, it does
> > not mean it does not exist there.
>
> Right. And if ARM says:
> "If an interrupt is received by the core during execution of an
> instruction that disables interrupts, the ARM7 family will still take
> the interrupt. This occurs for both IRQ and FIQ interrupts."
>
> The question is, since the pipeline is three-staged, at which point
> the interrupt (IRQ/IFQ) is being sampled after fetch, decode or
> execute cycle? I would imply int. sampling happens after execute.
> Would someone clarify this ARM statement, please?
> Thanks.
>
> Best regards
>
> Roger
>
>
>
>
> >
> > Best regards, Robert
> >
> > --- In lpc2000@yahoogroups.com, Jayasooriah <jayasooriah@> wrote:
> > >
> > > Dear Robert,
> > >
> > > In the FAQ you referred to, on "ARM7DTMI-S Core", to the FAQ:
> > >
> > > "Can spurious interrupts occur in the LPC200?",
> > >
> > > Your answer is:
> > >
> > > "Yes, spurious interrupts can occur in any ARM7 device that has
> > implemented
> > > the ARM Primecell Vectored Interrupt Controller (VIC)."
> > >
> > > I tried looking for a reference to this in the ARM site but cannot
> > find any.
> > >
> > > A search on "spurious" at the ARM web site yields 11 hits but
> > these appear
> > > not relevant to the VIC and spurious interrupt problem with the
> > ARM design
> > > that you seem to allude us to.
> > >
> > > I also did a brief search for information on the web relating to
> > spurious
> > > interrupts, and all the examples seem to point to LPC one way or
> > another.
> > >
> > > A spurious interrupt is a hardware interrupt which is generated by
> > system
> > > errors (http://www.answers.com/topic/interrupt-1), and systems
> > with
> > > spurious interrupts in general do not meet compliance requirements.
> > >
> > > Please clarify:
> > >
> > > 1/  Is this spurious interrupt problem an error in LPC
> > implementation of
> > > VIC or is it an error in ARM Primecell VIC specifications itself?
> > >
> > > 2/  Can you tell us if there are any other ARM cores with VIC that
> > also
> > > suffer from spurious interrupts problem that the LPC suffers from?
> > >
> > > Kind regards,
> > >
> > > Jaya
> > >
> > > PS:  I realise there has been discussion previously on spurious
> > interrupts,
> > > but none seem to throw any light on whether this is a problem
> > specific to
> > > LPC or it has to do with with ARM VIC design itself.
> > >
> > > --- In lpc2000@yahoogroups.com, "philips_apps" <philips_apps@>
> > wrote:
> > >  >
> > >  > Hi,
> > >  >
> > >  > have a look at the FAQ here:
> > >  >
> > >  > http://www.standardics.philips.com/support/faq/microcontrollers/
> > >  >
> > >  > I also added a link in the link section named
> > >  > "Philips FAQ for LPC2000 devices"
> > >  >
> > >  > Regards, Robert
> > >
> > > Send instant messages to your online friends
> > http://au.messenger.yahoo.com
> > >
> >
>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>

Re: [lpc2000] Re: spurious interrupts on LPC

2006-03-15 by Dewayne

I have a newbie question.  In the following code

    void ADC0Handler (void) __irq

What does __irq do?  I've never seen this before.
Thanks,
Dewayne

[Non-text portions of this message have been removed]

Re: spurious interrupts on LPC

2006-03-15 by unity0724

--- In lpc2000@yahoogroups.com, "roger_lynx" <roger_lynx@...> wrote:
> 
> Case closed? 
> Closed.
> 
> Roger

Wow, that's impressive...
You guys processed that "Spurious Interrupt" in just
a few clock cycles, instead of months....
What clock frequency is that LPC2x running??
Did you cheat by over-clocking to >70MHz??...  :)

Re: spurious interrupts on LPC

2006-03-15 by Jayasooriah

Dear Robert,

--- In lpc2000@yahoogroups.com, "philips_apps" <philips_apps@...> wrote:
 > I forwarded your question to the author of the FAQ because I do not
 > know the answer out of own experience. The Application Note makes
 > the clear statement that it is a general ARM7TDMI - VIC problem.
...
 > We do experience the problem and consider it a general issue, not
 > specific to the LPC2000. If competitors do not mention it, it does
 > not mean it does not exist there.

I do not know who "competitors" are and cannot comment on how they conduct 
their business.  Besides, my question relates to something in your FAQ and AN.

Your FAQ and AN states that LPC has spurious interrupts.  As far as LPCs 
are concerned I take this as an authoritative statement.

However, I thought FAQ suggested this is a generic problem affecting all 
ARM7TDMI VIC implementations.

I am looking for references to substantiate this.   I cannot find 
any.  Hence I asked you.

I am sure you (or for that matter the learned participants in this forum) 
would be able to provide such a reference, assuming it exists.

Meanwhile I look forward to what the authors of your FAQ and/or AN say.

Kind regards,

Jaya

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

Re: spurious interrupts on LPC

2006-03-15 by Jayasooriah

--- In lpc2000@yahoogroups.com, "roger_lynx" <roger_lynx@...> wrote:
 > >They however do not have to deal with spurious interrupts as a
 > >consequence.  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 >
 > Hi Jayasooriah,
 >
 > Oh?
 > On ARM core with PL 190 VIC, not dealing with this consequence is a
 > "blissful ignorance", IMHO.

In the OS that I run on many architectures and platforms (including ARM 
variants) spurious interrupts trigger a kernel panic.  It signals system 
failure. This behaviour of the OS is for compliance purposes.

Clearly it will not be certified to run on LPC because you can get spurious 
interrupts that (according to FAQ/AN) are not indication that there is a 
system failure.

 > Read this FAQ first: http://www.arm.com/support/faqip/3677.html
 > This is the original source. Philips included this info in their
 > latest LPC2148 UM, very helpful.

Sorry, wrong reference me thinks.  This is not a spurious interrupt 
problem.  It deals with interrupts being locked out because of race conditions.

There are well documented methods of dealing with this without having to 
allow for spurious interrupts.  Besides, this is not an indication of 
system failure.

 > > This begs the question: is this erroneous behaviour LPC specific, or
 > does
 > > it affect any other (all?) ARM VIC implementations?
 >
 > ARM's VIC Prime Cell PL 190, see document "ARM DDI 0181C", and Errata
 > 01.This document can be found on www.arm.com.

Where this document does it deal with spurious interrupts?

 > LPC 2000 is an ARMv4T (ATM7) with VIC PL190. This mis-behavior is
 > specific to ARM7 core(according to ARM).
 > There are other interrupt controllers for ARM7-based MCUs (Atmel,
 > Freescale, ST, etc.). I do not know how they address this
 > architectural flaw of spurious interrupts. I'd like to know.

I would like to know too ... if they suffer from spurious interrupt problem 
that the LPC does.

 > > The AN suggests the latter is the case but I cannot find any
 > documentation
 > > relating to ARM Primecell VIC specifications that supports this.
 >                                                ^^^^^^^^^^^^^^^^^^
 > What do you mean by "that supports this"?

I meant "supports this claim by Philips that ARM7-TDIM with VIC suffers 
from spurious interrupts".

 > After reading 'this': http://www.arm.com/support/faqip/3677.html,
 > 'that' becomes clearer.
 > ;-)

Not quite Roger.  The issue with reentrant ISRs is well known, but spurious 
interrupt is something quite different.

 > Take care.
 >
 > Roger

You too :)

Jaya

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

Re: spurious interrupts on LPC

2006-03-15 by Jayasooriah

Paul,

If you read my original post carefully, you will realise that I was talking 
about spurious interrupts, not nested interrupts or interrupt lockouts.

The word "spurious" applied to interrupts means "lacking authenticity or 
validity as to its origin".

The existence of an interrupt for which the system cannot identify its 
source is deemed as a system failure, and hence kernel "panics" in 
certified OSes.

--- In lpc2000@yahoogroups.com, "Paul Curtis" <plc@...> wrote:
 > It is not just the VIC. ...

But we are talking about VIC, more specifically in the context of ARM7TDMI.

 > Who cares?  The issue is well understood and the workaround easy.

Where spurious interrupt indicate system failure, any workaround that 
relies on ignoring these interrupts is not a solution.

Jaya

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

Re: [lpc2000] Re: spurious interrupts on LPC

2006-03-15 by 42Bastian Schick

Jayasooriah schrieb:
> 
> 1/  Is this spurious interrupt problem an error in LPC implementation of 
> VIC or is it an error in ARM Primecell VIC specifications itself?
> 
> 2/  Can you tell us if there are any other ARM cores with VIC that also 
> suffer from spurious interrupts problem that the LPC suffers from?

The Atmel AIC has the same problem.

And though I just start using it the ST STR7 EIC also.

If an interrupt request needs some cycles to propagate through 
peripheral -> (VIC|AIC|EIC) -> Core it is very likely that you
are able to disable the interrupt source before the VIC could
evaluate the source => spurious interrupt.

BTW: It is not an ARM problem. Coldfire CPUs do have the same problem.

-- 
42Bastian

Re: [lpc2000] Re: spurious interrupts on LPC

2006-03-15 by Michael Johnson

For whatever reason

http://www.arm.com/support/faqip/3677.html

doesn't show any more.

This problem (disabling an interrupt as it occurs) affects all 
ARM7TDMI's - the workarounds are (were) well documented.

Regards
Michael
Show quoted textHide quoted text
>--- In lpc2000@yahoogroups.com, "roger_lynx" <roger_lynx@...> wrote:
> > >They however do not have to deal with spurious interrupts as a
> > >consequence.  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> >
> > Hi Jayasooriah,
> >
> > Oh?
> > On ARM core with PL 190 VIC, not dealing with this consequence is a
> > "blissful ignorance", IMHO.
>
>In the OS that I run on many architectures and platforms (including ARM 
>variants) spurious interrupts trigger a kernel panic.  It signals system 
>failure. This behaviour of the OS is for compliance purposes.
>
>Clearly it will not be certified to run on LPC because you can get spurious 
>interrupts that (according to FAQ/AN) are not indication that there is a 
>system failure.
>
> > Read this FAQ first: http://www.arm.com/support/faqip/3677.html
> > This is the original source. Philips included this info in their
> > latest LPC2148 UM, very helpful.
>
>Sorry, wrong reference me thinks.  This is not a spurious interrupt 
>problem.  It deals with interrupts being locked out because of race conditions.
>
>There are well documented methods of dealing with this without having to 
>allow for spurious interrupts.  Besides, this is not an indication of 
>system failure.
>
> > > This begs the question: is this erroneous behaviour LPC specific, or
> > does
> > > it affect any other (all?) ARM VIC implementations?
> >
> > ARM's VIC Prime Cell PL 190, see document "ARM DDI 0181C", and Errata
> > 01.This document can be found on www.arm.com.
>
>Where this document does it deal with spurious interrupts?
>
> > LPC 2000 is an ARMv4T (ATM7) with VIC PL190. This mis-behavior is
> > specific to ARM7 core(according to ARM).
> > There are other interrupt controllers for ARM7-based MCUs (Atmel,
> > Freescale, ST, etc.). I do not know how they address this
> > architectural flaw of spurious interrupts. I'd like to know.
>
>I would like to know too ... if they suffer from spurious interrupt problem 
>that the LPC does.
>
> > > The AN suggests the latter is the case but I cannot find any
> > documentation
> > > relating to ARM Primecell VIC specifications that supports this.
> >                                                ^^^^^^^^^^^^^^^^^^
> > What do you mean by "that supports this"?
>
>I meant "supports this claim by Philips that ARM7-TDIM with VIC suffers 
>from spurious interrupts".
>
> > After reading 'this': http://www.arm.com/support/faqip/3677.html,
> > 'that' becomes clearer.
> > ;-)
>
>Not quite Roger.  The issue with reentrant ISRs is well known, but spurious 
>interrupt is something quite different.
>
> > Take care.
> >
> > Roger
>
>You too :)
>
>Jaya
>
>Send instant messages to your online friends http://au.messenger.yahoo.com 
>
>
> 
>Yahoo! Groups Links
>
>
>
> 
>
>
>  
>

Re: [lpc2000] Re: spurious interrupts on LPC

2006-03-15 by Dominic Rath

Google's Cache has it:

http://72.14.207.104/search?q=cache:uqap5i7sR2EJ:www.arm.com/support/faqip/3677.html

Regards,

Dominic
Show quoted textHide quoted text
On Wednesday 15 March 2006 10:04, Michael Johnson wrote:
> For whatever reason
>
> http://www.arm.com/support/faqip/3677.html
>
> doesn't show any more.
>
> This problem (disabling an interrupt as it occurs) affects all
> ARM7TDMI's - the workarounds are (were) well documented.
>
> Regards
> Michael

RE: [lpc2000] Re: spurious interrupts on LPC

2006-03-15 by Paul Curtis

Jaya, 

> If you read my original post carefully, you will realise that 
> I was talking about spurious interrupts, not nested 
> interrupts or interrupt lockouts.
> 
> The word "spurious" applied to interrupts means "lacking 
> authenticity or validity as to its origin".
> 
> The existence of an interrupt for which the system cannot 
> identify its source is deemed as a system failure, and hence 
> kernel "panics" in certified OSes.

I couldn't give a flying fig about Certified OSs.  The term "spurious"
in the Philips/ARM context is well defined.  You disable interrupts and
an ISR is entered nonetheless.  There are some other minor issues too.

> 
> --- In lpc2000@yahoogroups.com, "Paul Curtis" <plc@...> wrote:
>  > It is not just the VIC. ...
> 
> But we are talking about VIC, more specifically in the 
> context of ARM7TDMI.

I gave more references to other processor cores that also need to deal
with spurious interrupts.  You asked whether it was a VIC or core issue,
it is a core issue.  You just don't listen.

>  > Who cares?  The issue is well understood and the workaround easy.
> 
> Where spurious interrupt indicate system failure, any 
> workaround that relies on ignoring these interrupts is not a solution.

The workaround for this specific case (ISR entered, interrupts disabled)
can only occur in one way as far as I am aware.  This distinguishes a "I
didn't expect that, something bad has happened" case from a "I know
about that, I'll fix it" case.

--
Paul Curtis, Rowley Associates Ltd   http://www.rowley.co.uk 
CrossWorks for MSP430, ARM, AVR and now MAXQ processors

Re: spurious interrupts on LPC

2006-03-15 by brendanmurphy37

--- In lpc2000@yahoogroups.com, Jayasooriah <jayasooriah@...> wrote:
> 
> In the OS that I run on many architectures and platforms (including 
ARM 
> variants) spurious interrupts trigger a kernel panic.  It signals 
system 
> failure. This behaviour of the OS is for compliance purposes.
> 
> Clearly it will not be certified to run on LPC because you can get 
spurious 
> interrupts that (according to FAQ/AN) are not indication that there 
is a 
> system failure.

I'm really baffled by your statements above: what you're effectively 
saying is that if the person porting an OS to a particular platform 
is prepared wilfully to ignore the (well-understood and well-
documented) issues with that platform, they won't get their 
OS "certified" (by whom incidentally?). All I can say to that is "so, 
what?". If you choose to ignore information provided by hardware 
vendors, then tough. The fix is simple and efficient to implement: no 
need for kernel panics or system failures.

By the way, it's completely irrelevant who's to "blame" for this 
(Philips or ARM or whoever): the only relevant thing is that the 
issue is documented and a fix provided (which it is).

It seems to me you are more interested in pointing fingers of blame 
at people, rather than contributing anything positive. The issue is 
already well understood and documented. What exactly are you trying 
to achieve or add to this?

Brendan

Re: [lpc2000] Re: spurious interrupts on LPC

2006-03-15 by Alexey Bishletov

3:12:07 AM, Wednesday, March 15, 2006, philips_apps wrote:

> I forwarded your question to the author of the FAQ because I do not
> know the answer out of own experience. The Application Note makes 
> the clear statement that it is a general ARM7TDMI - VIC problem.
> For those interested in the detailled application note that 
> describes how to handle spurious interrupts:
> http://www.standardics.philips.com/support/documents/microcontrollers
> /pdf/an10414.pdf

 If someone use CPRS to disable and enable interrupts instead of using
VICIntEnClr, will he have problems with spurious interrupts discussed
in AN?

 WBR,  Alex

Re: [lpc2000] Re: spurious interrupts on LPC

2006-03-15 by 42Bastian Schick

Alexey Bishletov schrieb:

>  If someone use CPRS to disable and enable interrupts instead of using
> VICIntEnClr, will he have problems with spurious interrupts discussed
> in AN?

The problem comes up if the reason for the interrupt is gone away before 
the VIC could ack it. This happens mainly because the interrupt was 
disabled in the peripheral.

Changing CPSR could not provocate such.

But having a default interrupt handler installed is good practice (or 
defensive programming) anyway.

(Same as initializing _all_ peripherals, not only those used.)
-- 
42Bastian

Re: spurious interrupts on LPC

2006-03-15 by Jayasooriah

Dear Robert,

I am happy to share with you my knowledge about spurious interrupts, and my 
understanding of what is happening.

--- In lpc2000@yahoogroups.com, "Robert" <philips_apps@...> wrote:
 > We would however greatly appreciate if you would provide your
 > knowledge by investigating competitor devices using the VIC and
 > telling this community if this is not a general ARM VIC as stated in
 > the Application Note by running the same code on a competitor device
 > not showing the problem and on a LPC2000 device, showing the issue.

As this is a LPC forum I will confine myself to what I know about LPC.

First let us look at the ARM FAQ 3677 that can be found at:

   http://www.arm.com/support/faqip/3677.html

This document describes how this latency between the core receiving an 
interrupt and taking that interrupt can give rise to two problems:

P1: If a procedure checks interrupt mask bits PSR to determine if it was 
invoked anachronously (external interrupt) or synchronously (procedure 
call), this can fail if the interrupt mask bits were changed during the 
short interval between the core receiving the interrupt and taking the 
interrupt.

P2: If both IRQ and FIQ are both disabled during the interval between the 
core receiving and taking an interrupt, FIQ will be locked out for the 
duration of the IRQ ISR.

Neither of these problems result in (or are related to) spurious interrupts.

This latency exists on all ARM cores of whether or not VIC exists.  It does 
not require OSes to accommodate spurious interrupts, quite simply because 
none is generated as a consequence.

Now consider the Philips Application Note 10414 at:

   http://www.standardics.philips.com/support/documents/microcontrollers/pdf/an10414.pdf

This document describes a different problem relating to "spurious 
interrupts".  The interrupts are spurious because the VIC is not able to 
resolve the source.

Two scenarios are given, one relating to watchdog feed and the other 
relating to UART RDA/CTI interrupts.

To understand what happens with the recommended method of disabling 
interrupts while feeding watchdog, first consider how the ARM core and VIC 
cooperate when handling interrupts.

The VIC raises an interrupt event.  In response, the ARM core completes 
whatever it is doing, including instructions already in its pipeline, and 
then takes the interrupt by loading the PC with the address provided by VIC.

According to the AN, it appears that if one of the instructions in that 
pipeline was clearing the interrupt enable flag of the VIC, then the VIC 
loses track of the source of the interrupt.

Thus by the time the ARM core takes the interrupts, the VIC can only 
provide the "default" address for the interrupt that occurred.

Hence although there was a legitimate interrupt, because the VIC was not 
able to determine the source, this has now become a spurious interrupt.

This is why when a spurious interrupt occurs, the application must not 
ignore it.  It must do the task the VIC was designed to do by other means.

So essentially in the LPC, we have a VIC that fails when its interrupt 
enable flag is being cleared.  This is either a design or implementation 
fault.  If it were a design fault, then it would exist in any ARM+VIC as 
the application note claims.

I feel it is unlikely that the ARM design is flawed to this extent that 
makes the VIC unusable under many conditions for example when the system 
cannot afford to miss a fast or vectored interrupt.

[When I get my OKI board which has VIC and watchdog just like LPC does, and 
run your code on it, I will be able to say conclusively if this problem 
generic to ARM+VIC ... at the moment I do not know and hence I asked for 
references.]

Lets look at the second scenario for spurious interrupts relating to RDA 
(receive data available) and CTI (character receive time-out) interrupts.

This AN states:

"Now lets consider that a CTI interrupt took place and the VIC reported 
this event to the core. ... Lets assume that at this very moment a 
character is received by the UART FIFO. This would clear the CTI interrupt 
thereby causing a spurious interrupt."

Wait a minute!  Does this mean that the UART raised CTI interrupt, and 
before this interrupt could be serviced, changed its mind because it 
discovered it received a character in the meanwhile?  How come CTI 
interrupt is not latched?

Is this not an excellent example of how to generate an ill conditioned 
interrupt?

Not latching the CTI interrupt as in the LPC will create spurious 
interrupts in any system because there is always a latency between 
registering and taking the interrupt.

The bottom line for me (and the reason why I asked this question on the 
web) is that I have a design coming with the OKI part to replace LPC.  This 
design cannot tolerate spurious interrupts.  If I now the problem is VIC 
specific, then I will be advising them to look for another part.

I have shot a question to ARM and I am not sure how long it will be before 
I get a response.  I will surely post the response if ARM allows me to.

Kind regards,

Jaya

PS:  This is a rush off-the-cuff write-up -- if there are any errors that 
obscures the explanation, feel free to correct and clarify.

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

Re: spurious interrupts on LPC

2006-03-15 by brendanmurphy37

Jaya,

Since you keep asking, it doesn't take too much effort to find the 
following:

http://document.sharpsma.com/files/tec_errata_LH7A404-SMA03018A.pdf

This describes a similar issue with an ARM/VIC part where the default 
interrupt function is called in a spurious fashion. It may or may not 
be exactly the same problem, but it does tend to support the argument 
that the issue isn't unique to the Philips part.

My own interest is that some time ago we discovered this issue when 
stressing the UART. We found that very occasionally (after a couple of 
hours on a system with maybe 50k interrupts/second) the default 
interrupt handler would be called. We reported the problem to Philips 
(this was before there was either an app note or errata), who 
acknowledged the problem, and subsequently published the relevant 
information.

The interrupt is spurious in the sense that it happens and has no 
value. If you don't want to handle the source of the interrupt in the 
default interrupt handler, you don't have to. All you have to do is 
acknowledge the VIC that it's been seen (the usual write to 
VICVectAddr). If there is still an interrupt there, it will be handled 
as normal. Obviously, if the source of the interrupt has gone (as in 
the UART example where the received character will essentially 
overwrite the CTI interrupt source) there's no need for anything else. 
There's nothing been lost or not latched.

To be fair, this isn't totally clear from the Philips app note.

The bottom line though is that it's a known problem with a known 
solution, so why labour the point?

Brendan

Re: spurious interrupts on LPC

2006-03-15 by Jayasooriah

Brendan,

Superfifically it looks like the same problem but if you read it you should 
be able to work out that the spurious interrupt problem in LPC is different 
to the spurious interrupt in LH implementation:

1/  The VIC problem described in paragraph 16 relates to race condition 
that exists when two interrupts occur at the same time, one of which goes 
through the VIC.

The legitimate interrupt received by the VIC is not lost, but delayed until 
after the spurious interrupt is taken.  Thus the spurious interrupt ISR 
does poll all sources of vectored interrupts.

In the case of LPC, a legitimate interrupt is lost when VIC interrupt 
enable flag is being cleared as it occurs.  This is why the spurious 
interrupt ISR here must scan all sources of *vectored* interrupts.

2/  The MMC problem described in paragraph 17 relates to MMC, not VIC. If 
it were a VIC problem, then it would apply to other interrupts besides MMC, 
and it does not.  Also we should be able to see this on LPCs too if it was 
ARM + VIC implementation issue, but this appears not to be the case.

Also, Sharp does not claim the problems in their implementation is generic 
to any or all other ARM + VICs.  If it were, the same bug would show up in 
LPC too, but this does not seem to be the case.

Philips claims this bug exists in all ARM7TDMI with VIC. If this claim were 
true, we should see reports of such spurious interrupts on other variants, 
but this appears not to be the case.

Have you any other references that says this is a generic ARM7TDMI + VIC 
problem.  For example, can anyone run the Philips watchdog experiment on 
any of the other variants and say if the same problem exists?

I have asked people to try and no one has been able to repeat this on any 
of the other ARM variants so far.

One more thing Brendan, trying to mitigate effects of not latching CTI in 
the UART implementation only makes you look silly because the VIC 
specifications is very clear (see Note on page 2-2 of TRM) that it does NOT 
handle interrupt sources with transient behaviour.  Period.

Kind regards,

Jaya

--- In lpc2000@yahoogroups.com, "brendanmurphy37" <brendan.murphy@...> wrote:
 >
 >
 > Jaya,
 >
 > Since you keep asking, it doesn't take too much effort to find the
 > following:
 >
 > http://document.sharpsma.com/files/tec_errata_LH7A404-SMA03018A.pdf
 >
 > This describes a similar issue with an ARM/VIC part where the default
 > interrupt function is called in a spurious fashion. It may or may not
 > be exactly the same problem, but it does tend to support the argument
 > that the issue isn't unique to the Philips part.
 >
 > My own interest is that some time ago we discovered this issue when
 > stressing the UART. We found that very occasionally (after a couple of
 > hours on a system with maybe 50k interrupts/second) the default
 > interrupt handler would be called. We reported the problem to Philips
 > (this was before there was either an app note or errata), who
 > acknowledged the problem, and subsequently published the relevant
 > information.
 >
 > The interrupt is spurious in the sense that it happens and has no
 > value. If you don't want to handle the source of the interrupt in the
 > default interrupt handler, you don't have to. All you have to do is
 > acknowledge the VIC that it's been seen (the usual write to
 > VICVectAddr). If there is still an interrupt there, it will be handled
 > as normal. Obviously, if the source of the interrupt has gone (as in
 > the UART example where the received character will essentially
 > overwrite the CTI interrupt source) there's no need for anything else.
 > There's nothing been lost or not latched.
 >
 > To be fair, this isn't totally clear from the Philips app note.
 >
 > The bottom line though is that it's a known problem with a known
 > solution, so why labour the point?
 >
 > Brendan

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

Re: spurious interrupts on LPC

2006-03-16 by brendanmurphy37

Jaya,

Three points:

- I specifically said that the Sharp problem may or may not be the 
same one: the point is that it is another example of a spurious 
interrupt using a similar setup (ARM + VIC + default interrupt being 
taken when it shouldn't). Frankly, I don't know how you can draw the 
conclusions you do with the very limited information provided. As 
I've already pointed out, it's irrelevant whether the cause is ARM 
or Philips in origin, which brings me to my second point...

- I could do comparative tests, but why would I (or anyone come to 
it) spend the time and effort on it? The problem exists, has been 
documented, and a fix provided. What more do you need? There are 
plenty of reasons to choose one micro over another, or even one ARM 
over another: this isn't one of them. You will find that OKI too 
have their quirks, some documented, some not. I'm not picking on OKI 
in particular here (it's a general statement): just that you 
mentioned them and I've experience of both OKI and Philips ARM 
parts. I'd recommend to anyone to look at the information provided 
in order to make the choice. 

- If you think what I say makes me look silly, that's fine by me 
(your comment says far more about you than me). I've said it before: 
people will make their own minds up on what anyone says here, based 
on the evidence provided. I'm happy to stand over anything I've said 
here, or to correct it if it is indeed wrong.

Brendan

--- In lpc2000@yahoogroups.com, Jayasooriah <jayasooriah@...> wrote:
>
> Brendan,
> 
> Superfifically it looks like the same problem but if you read it 
you should 
> be able to work out that the spurious interrupt problem in LPC is 
different 
> to the spurious interrupt in LH implementation:
> 
> 1/  The VIC problem described in paragraph 16 relates to race 
condition 
> that exists when two interrupts occur at the same time, one of 
which goes 
> through the VIC.
> 
> The legitimate interrupt received by the VIC is not lost, but 
delayed until 
> after the spurious interrupt is taken.  Thus the spurious 
interrupt ISR 
> does poll all sources of vectored interrupts.
> 
> In the case of LPC, a legitimate interrupt is lost when VIC 
interrupt 
> enable flag is being cleared as it occurs.  This is why the 
spurious 
> interrupt ISR here must scan all sources of *vectored* interrupts.
> 
> 2/  The MMC problem described in paragraph 17 relates to MMC, not 
VIC. If 
> it were a VIC problem, then it would apply to other interrupts 
besides MMC, 
> and it does not.  Also we should be able to see this on LPCs too 
if it was 
> ARM + VIC implementation issue, but this appears not to be the 
case.
> 
> Also, Sharp does not claim the problems in their implementation is 
generic 
> to any or all other ARM + VICs.  If it were, the same bug would 
show up in 
> LPC too, but this does not seem to be the case.
> 
> Philips claims this bug exists in all ARM7TDMI with VIC. If this 
claim were 
> true, we should see reports of such spurious interrupts on other 
variants, 
> but this appears not to be the case.
> 
> Have you any other references that says this is a generic ARM7TDMI 
+ VIC 
> problem.  For example, can anyone run the Philips watchdog 
experiment on 
> any of the other variants and say if the same problem exists?
> 
> I have asked people to try and no one has been able to repeat this 
on any 
> of the other ARM variants so far.
> 
> One more thing Brendan, trying to mitigate effects of not latching 
CTI in 
> the UART implementation only makes you look silly because the VIC 
> specifications is very clear (see Note on page 2-2 of TRM) that it 
does NOT 
> handle interrupt sources with transient behaviour.  Period.
> 
> Kind regards,
> 
> Jaya
> 
> --- In lpc2000@yahoogroups.com, "brendanmurphy37" 
<brendan.murphy@> wrote:
>  >
>  >
>  > Jaya,
>  >
>  > Since you keep asking, it doesn't take too much effort to find 
the
>  > following:
>  >
>  > http://document.sharpsma.com/files/tec_errata_LH7A404-
SMA03018A.pdf
>  >
>  > This describes a similar issue with an ARM/VIC part where the 
default
>  > interrupt function is called in a spurious fashion. It may or 
may not
>  > be exactly the same problem, but it does tend to support the 
argument
>  > that the issue isn't unique to the Philips part.
>  >
>  > My own interest is that some time ago we discovered this issue 
when
>  > stressing the UART. We found that very occasionally (after a 
couple of
>  > hours on a system with maybe 50k interrupts/second) the default
>  > interrupt handler would be called. We reported the problem to 
Philips
>  > (this was before there was either an app note or errata), who
>  > acknowledged the problem, and subsequently published the 
relevant
>  > information.
>  >
>  > The interrupt is spurious in the sense that it happens and has 
no
>  > value. If you don't want to handle the source of the interrupt 
in the
>  > default interrupt handler, you don't have to. All you have to 
do is
>  > acknowledge the VIC that it's been seen (the usual write to
>  > VICVectAddr). If there is still an interrupt there, it will be 
handled
>  > as normal. Obviously, if the source of the interrupt has gone 
(as in
>  > the UART example where the received character will essentially
>  > overwrite the CTI interrupt source) there's no need for 
anything else.
>  > There's nothing been lost or not latched.
>  >
>  > To be fair, this isn't totally clear from the Philips app note.
>  >
>  > The bottom line though is that it's a known problem with a known
>  > solution, so why labour the point?
>  >
>  > Brendan
> 
> Send instant messages to your online friends 
http://au.messenger.yahoo.com
>

Re: spurious interrupts on LPC

2006-03-17 by Jayasooriah

Brendan,

Yet again your post contradicts many findings by different people in this 
forum.  Furthermore it is not consistent with explanations in both AN10414 
and PL190TRM.

1/  The issue you vaguely refer to as "certain conditions does not provide 
correct vector address" has been explained precisely in AN10414.  What is 
missing or not the underlying cause.

When the VIC raises the interrupt, it determines the source of the 
interrupt and loads this into the call vector.  [Quick experimentation 
suggests it does this correctly.]

However if this interrupt was disabled (in the pipeline) after it was 
raised, when the ISR reads this call vector, VIC returns the default vector 
instead.

It does not appear that call vector was corrupted and all indications are 
that it is still there.  It is not clear why the VIC chose not to return 
the call vector -- I can only guess it was gated with interrupt enable bit 
as a shortcut.

The solution to avoiding spurious interrupts (and not working around by the 
default ISR polling all possible interrupt sources as recommended in 
AN10414) involves determining why the VIC returned the default vector.

[Note that this has little to do with the ARM7TDMI interface with VIC as 
this problem is generic to all pipelined architectures.]

2/  According to AN10414 and PL190TMR, your fix that involves ignoring the 
interrupt, and returning from interrupt by just writing 0xff to the call 
vector register WILL NOT WORK.

AN10414 states:

>In this handler, the following should be done:
>1. Find the source of the interrupt (if there are multiple interrupt ources).
>2. Clear the interrupt source (optional as shown in the UART case).
>3. Update the VIC by writing to the VIC Vector Address Register.

PL190TM states:

>You must use this register as follows:
>• the ISR reads the VICVectAddr Register when an IRQ interrupt is generated
>• at the end of the ISR, the VICVectAddr Register is written to, to update 
>the priority hardware.
>
>Reading from or writing to the register at other times can cause incorrect 
>operation.

3/  The solution outlined in AN10414 IMO creates more problems and imposes 
additional (difficult) constraints relating to mutual exclusion on ALL 
ISRs, not just those relating to vectored interrupts.

[I am in the processing of documenting a solution to the VIC spurious 
interrupt problem on LPC2294.  It is based on PREVENTING, not HANDLING 
spurious interrupts.  There are a issues still outstanding.]

Based on what I have been working with over the last week, I know that, if 
you do not appreciate the problem correctly, you are in be in for a lot of 
surprises when you use the LPC in a system where there are lots of random 
and and successive interrupts from the one source, for example an 
accelerometer.

Good luck.

Jaya

--- In lpc2000@yahoogroups.com, "brendanmurphy37" <brendan.murphy@...> wrote:
 >
 > There's been a degree of noise recently on the issue of spurious
 > interrupts, the importance of which has been blown out of all
 > proportion. Various claims have been thrown into the mix, which
 > might lead one to believe that there's some sort of serious,
 > undocumented and underlying flaw in the LPC2000. It's my belief,
 > based on the information available and direct experience of the
 > issue, that (1) there is an issue with spurious interrupts; (2) it
 > can be a problem; and (3), the fix is simple.
 >
 > The issue is that in certain conditions the VIC doesn't provide the
 > correct vector address (in VICVectAddr) when handling vectored
 > interrupts: it provides the default vector address (VICDefVectAddr)
 > instead. This is a very rare occurrence. Mentioning this rarity is
 > not to indicate it can be ignored, but is a warning that you're
 > unlikely to see it in normal testing.

I would not call this a rare occurrence given the number of people in this 
forum who raised spurious interrupt problems resulting in Philips releasing 
an application note early this year.

 > Whether this issue is specific
 > to the Philips parts, or is a general ARM issue (both core and VIC
 > are ARM designs) is a moot point: the behaviour exists.

It is not a moot point for those who cannot tolerate spurious interrupts. 
They wish to know if VIC generates spurious interrupts in other ARM7TDMI 
variants as claimed in AN10414.

[This is the my reason for looking into this problem.]

 > The problem is that the default initialisation of the VICDefVectAddr
 > is zero. Hence, if this condition happens, the default behaviour is
 > for the processor to jump to zero. On some systems this is
 > completely benign; on others it could be catastrophic.
 >
 > The fix is simple, and as already been pointed out, good programming
 > practice in any case: you need to supply a default interrupt handler
 > even if strictly speaking your system doesn't otherwise need one.

See above why this simple solution is not a solution.

 > This is the one we use:
 >
 > void  default_interrupt_handler(void)
 > {
 >       return;
 > }
 >
 > The VIC needs to be initialised with something like:
 >
 > VICDefVectAddr = (unsigned int) default_interrupt_handler;
 >
 > That's about it.

When spurious interrupts are involved, ignorance is no bliss.

 > One final minor point is that the above assumes
 > that the assembler code that dispatches the `C' interrupt handler,
 > and to which it returns, writes to VICVectAddr after the function
 > returns. If not, you'll need to add something like the following to
 > the interrupt handler:
 >
 > VICVectAddr = 0xff;
 >
 > The only disadvantages that I can see to this whole issue is that
 > (1) you have to be aware of it (2) you have to provide a fix (which
 > can be very simple though) and (3) there is an overhead in handling
 > the spurious interrupt (it happens so rarely though this can be
 > discounted).
 >
 > All of this is well documented, by the way.
 >
 > There's no case where interrupts are lost or the system will get
 > locked or fail in some mysterious way. If anyone (including and
 > especially Philips)  has information or hard evidence to the
 > contrary, I'd be very interested to hear it, as I'm sure others
 > would.

If you ignore the interrupts as you propose, you will lose interrupts for 
sure.  Not only that, you could end up in live-lock situation.

 > Further information for those interested:
 >
 > There is an app note from Philips that shows how you can handle the
 > source of the interrupt in your default interrupt handler. You can
 > obviously do this, although you are faced with the issue of
 > identifying the source. To my mind this approach is somewhat
 > misguided: it's unnecessarily complex, and it will be difficult to
 > test (due to the very sporadic nature of the problem arising). I
 > think it's better to just do nothing in the default handler: the
 > peripheral's interrupt will remain asserted and the correct vectored
 > interrupt will be entered subsequently (maybe not immediately if a
 > higher priority interrupt has happened in the meantime).
 >
 > As a note to Jaya: your concern over the UART CTI interrupt
 > being "ill conditioned" or "not latched" is misplaced. The statement
 > in the app note about a character being received clearing the CTI
 > interrupt is simply restating the UART description of the UART
 > Interrupt Identification Register (IIR): it will always happen,
 > regardless of whether or not there's a spurious interrupt (or even a
 > VIC for that matter). There's no suggestion that the interrupt isn't
 > latched and remain so until the IIR is read. My own previous
 > reference to this as "overwriting" may have been clumsy or
 > imprecise, but hardly "silly". You are of course entitled to your
 > opinion.

AN10414 very clearly states:

>Now lets consider that a CTI interrupt took place and the VIC reported 
>this event to the core. The core latched the IRQ state. So now the core 
>would be in step3 (Section 2.1). Lets assume that at this very moment a 
>character is received by the UART FIFO. This would clear the CTI interrupt 
>thereby causing a spurious interrupt.

 >
 > Brendan 

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

Core's interrupt sampling: was Re: spurious interrupts on LPC

2006-03-17 by roger_lynx

--- In lpc2000@yahoogroups.com, "roger_lynx" <roger_lynx@...> wrote:

> 
> The question is, since the pipeline is three-staged, at which point
> the interrupt (IRQ/IFQ) is being sampled after fetch, decode or
> execute cycle? I would imply int. sampling happens after execute.
> Would someone clarify this ARM statement, please?
> Thanks.
> 
>

From http://www.arm.com/support/faqip/3678.html :

What happens if an interrupt occurs as it is being enabled?

Applies to: ARM7TDMI

Interrupts are enabled by clearing the I (for IRQ) or F (for FIQ)
flags in the CPSR with an MSR instruction. If an interrupt occurs as
it is being enabled, the instruction following the MSR instruction
will still be executed.

The reason is that the new flags are only available to the control
logic at the end of the execution stage of the MSR instruction. 
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The next instruction will have already been decoded and enters the
execution stage of the instruction pipeline just as the flags are
being changed.

Re: spurious interrupts on LPC

2006-03-17 by brendanmurphy37

With apologies to all for the length of this postÂ….

Jaya,

Many thanks for your response: I think it well worth it to try and 
get to the bottom of this.

--- In lpc2000@yahoogroups.com, Jayasooriah <jayasooriah@...> wrote:
>
> Brendan,
> 
> Yet again your post contradicts many findings by different people 
in this 
> forum.  Furthermore it is not consistent with explanations in both 
AN10414 
> and PL190TRM.

I'd be curious to know which parts of the post contradict the many 
findings of these different people: can you supply an example, 
please?

> 
> 1/  The issue you vaguely refer to as "certain conditions does not 
provide 
> correct vector address" has been explained precisely in AN10414.  
What is 
> missing or not the underlying cause.

I wasn't being vague, simply summarising in as brief a form as 
possible the well-documented issue, that as you point out has 
already been explained precisely elsewhere. Try reading it again and 
telling me which part is inaccurate or wrong: "Â…in certain 
conditions the VIC doesn't provide the correct vector addressÂ…". Why 
bother repeating the details?

As for the underlying cause, I'm sure Philips (and ARM, if it's an 
ARM issue) are very well aware of the underlying cause. It's of no 
interest to me though: all I'm interested in is the observed 
behaviour. I'm particularly not interested in speculating on the 
underlying cause, attempting to use incomplete information to draw 
wild conclusions.

> 
> When the VIC raises the interrupt, it determines the source of the 
> interrupt and loads this into the call vector.  [Quick 
experimentation 
> suggests it does this correctly.]
> 
> However if this interrupt was disabled (in the pipeline) after it 
was 
> raised, when the ISR reads this call vector, VIC returns the 
default vector 
> instead.
> 
> It does not appear that call vector was corrupted and all 
indications are 
> that it is still there.  It is not clear why the VIC chose not to 
return 
> the call vector -- I can only guess it was gated with interrupt 
enable bit 
> as a shortcut.

Can you explain this last statement, please? I'm fascinated.

> 
> The solution to avoiding spurious interrupts (and not working 
around by the 
> default ISR polling all possible interrupt sources as recommended 
in 
> AN10414) involves determining why the VIC returned the default 
vector.

It's not necessary to poll the interrupt sources if you're not 
interested in handling the source of the spurious interrupt within 
the default interrupt handler. Maybe you should read my post again? 
True, it's something of a work around having a spurious interrupt 
handler to handle a spurious interrupt, but as I pointed out, one 
that's very easy and simple to live with (and as others have pointed 
out, good programming practice in any case).

> 
> [Note that this has little to do with the ARM7TDMI interface with 
VIC as 
> this problem is generic to all pipelined architectures.]

You'll have to explain the relevance of this last statement to me.

> 
> 2/  According to AN10414 and PL190TMR, your fix that involves 
ignoring the 
> interrupt, and returning from interrupt by just writing 0xff to 
the call 
> vector register WILL NOT WORK.

Can you supply some evidence that it won't work, please? I'd love to 
hear it. 

> 
> AN10414 states:
> 
> >In this handler, the following should be done:
> >1. Find the source of the interrupt (if there are multiple 
interrupt ources).
> >2. Clear the interrupt source (optional as shown in the UART 
case).
> >3. Update the VIC by writing to the VIC Vector Address Register.
> 

Agreed, this is all certainly true, but only if you want to handle 
the source of the interrupt in the default interrupt handler, which 
is what the app note is all about. My point is that you don't have 
to. If I'm incorrect in this, I'm perfectly willing to admit I'm 
wrong (I've been wrong many times before), but I'd like to see some 
evidence first, or explanation from a credible source. By "credible" 
by the way, I mean Philips or ARM.

> PL190TM states:
> 
> >You must use this register as follows:
> >• the ISR reads the VICVectAddr Register when an IRQ interrupt is 
generated
> >• at the end of the ISR, the VICVectAddr Register is written to, 
to update 
> >the priority hardware.
> >
> >Reading from or writing to the register at other times can cause 
incorrect 
> >operation.

Agreed: all true. If you read my post again you will see that I 
explicitly mentioned you have to do this, even in an otherwise empty 
interrupt handler. If you don't (read or write to the register that 
is) you're on your own.

> 
> 3/  The solution outlined in AN10414 IMO creates more problems and 
imposes 
> additional (difficult) constraints relating to mutual exclusion on 
ALL 
> ISRs, not just those relating to vectored interrupts.

Agreed: I think I used the term "misguided". The basic solution – to 
provide a default interrupt handler – is however quite valid, simple 
to implement and easy to prove correct.

> 
> [I am in the processing of documenting a solution to the VIC 
spurious 
> interrupt problem on LPC2294.  It is based on PREVENTING, not 
HANDLING 
> spurious interrupts.  There are a issues still outstanding.]

I'd can't wait to see it! I assume you'll post it here?

> 
> Based on what I have been working with over the last week, I know 
that, if 
> you do not appreciate the problem correctly, you are in be in for 
a lot of 
> surprises when you use the LPC in a system where there are lots of 
random 
> and and successive interrupts from the one source, for example an 
> accelerometer.

Jaya, I can assure you I do appreciate this problem. As I think I 
mentioned we actually experienced it before it was documented. The 
system we discovered it on has many, many interrupts, from different 
sources, at different rates (inclduing randomly), and different 
priorities. I won't bore you or anyone else with the details: I find 
it somewhat tedious when people describe in great detail how complex 
their systems are, assuming they are somehow unique in this respect. 

[Text removed here]

>  > The issue is that in certain conditions the VIC doesn't provide 
the
>  > correct vector address (in VICVectAddr) when handling vectored
>  > interrupts: it provides the default vector address 
(VICDefVectAddr)
>  > instead. This is a very rare occurrence. Mentioning this rarity 
is
>  > not to indicate it can be ignored, but is a warning that you're
>  > unlikely to see it in normal testing.
> 
> I would not call this a rare occurrence given the number of people 
in this 
> forum who raised spurious interrupt problems resulting in Philips 
releasing 
> an application note early this year.

I meant rare in the sense it doesn't happen very often on a 
particular system, not that it has been rarely observed by different 
people. 

> 
>  > Whether this issue is specific
>  > to the Philips parts, or is a general ARM issue (both core and 
VIC
>  > are ARM designs) is a moot point: the behaviour exists.
> 
> It is not a moot point for those who cannot tolerate spurious 
interrupts. 
> They wish to know if VIC generates spurious interrupts in other 
ARM7TDMI 
> variants as claimed in AN10414.

We'll just have to disagree on this one: all I can say is that it's 
a moot point for me, and I suspect most other people. To use an 
analogy: if there's a problem with your Ford, and they blame a 
component manufacturer, it might be of interest to you if you choose 
your cars based on the behaviour of individual components, but it's 
pretty academic to most people: they just want a car that works.

> 
> [This is the my reason for looking into this problem.]
> 
>  > The problem is that the default initialisation of the 
VICDefVectAddr
>  > is zero. Hence, if this condition happens, the default 
behaviour is
>  > for the processor to jump to zero. On some systems this is
>  > completely benign; on others it could be catastrophic.
>  >
>  > The fix is simple, and as already been pointed out, good 
programming
>  > practice in any case: you need to supply a default interrupt 
handler
>  > even if strictly speaking your system doesn't otherwise need 
one.
> 
> See above why this simple solution is not a solution.

Again, maybe I'm slow, but can you explain why it isn't?

> 
>  > This is the one we use:
>  >
>  > void  default_interrupt_handler(void)
>  > {
>  >       return;
>  > }
>  >
>  > The VIC needs to be initialised with something like:
>  >
>  > VICDefVectAddr = (unsigned int) default_interrupt_handler;
>  >
>  > That's about it.
> 
> When spurious interrupts are involved, ignorance is no bliss.

It's not ignoring the interrupt: just not handling it in the default 
interrupt handler. As I explained, it will be handled later, as the 
peripheral causing it will still be asserting it.

[More text removed here]

> If you ignore the interrupts as you propose, you will lose 
interrupts for 
> sure.  Not only that, you could end up in live-lock situation.
> 

Can you explain this live-lock situation and how it might arise?

[More text removed here]

>  > As a note to Jaya: your concern over the UART CTI interrupt
>  > being "ill conditioned" or "not latched" is misplaced. The 
statement
>  > in the app note about a character being received clearing the 
CTI
>  > interrupt is simply restating the UART description of the UART
>  > Interrupt Identification Register (IIR): it will always happen,
>  > regardless of whether or not there's a spurious interrupt (or 
even a
>  > VIC for that matter). There's no suggestion that the interrupt 
isn't
>  > latched and remain so until the IIR is read. My own previous
>  > reference to this as "overwriting" may have been clumsy or
>  > imprecise, but hardly "silly". You are of course entitled to 
your
>  > opinion.
> 
> AN10414 very clearly states:
> 
> >Now lets consider that a CTI interrupt took place and the VIC 
reported 
> >this event to the core. The core latched the IRQ state. So now 
the core 
> >would be in step3 (Section 2.1). Lets assume that at this very 
moment a 
> >character is received by the UART FIFO. This would clear the CTI 
interrupt 
> >thereby causing a spurious interrupt.

Correct! and all entirely consistent. As the UART description makes 
clear, receiving a character (activity in the FIFO) will clear the 
CTI interrupt. As the app note makes clear, changing the status 
during this critical period causes the spurious interrupt. I suggest 
you work through the details of how back-to-back CTI and received 
character interrupts are handled (with and without a VIC, with and 
without spurious interrupts) and all should become clear. Don't 
forget not to confuse acknowledging interrupts in the peripheral and 
acknowledging them in the VIC.

With best wishes.

Brendan

Re: spurious interrupts on LPC

2006-03-19 by Jayasooriah

Hello,

Arising out of requests from a number of people, I have documented the root 
cause of spurious interrupts on LPC based on my experiments with LPC2292 as 
I see it.  You can find this document (in progress) at:

   http://www.cse.unsw.edu.au/~jayas/esdk/lpc2/spurious-irq.html

The root cause of these spurious interrupts does not lie in the interaction 
of the ARM core with VIC as claimed by Philips.  Hence it is unlikely that 
other ARM cores with VIC will suffer the these spurious interrupt problems.

The root cause of spurious interrupts generated when VICINTCLEAR is used to 
disable interrupts is the internal priority logic of the VIC as implemented 
on the LPCs.

The root cause of spurious interrupts generated through interaction of RDA 
and CTI for UART0/1 is the internal logic within these peripheral devices.

I have not got around to documenting hazards arising out of work-arounds as 
suggested in AN10414.

However, given the framework I have described for creating these spurious 
interrupts in a deterministic way, it is not hard for anyone to extend the 
experiments to find out exactly what happens and work out strategies of 
preventing them.

For starters, I would not recommend anyone disable interrupts using the 
VIC.  Use the F and I bits in CPSR instead.  They are there for this 
purpose and they do not generate spurious interrupts.

Kind regards,

Jaya

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

Re: spurious interrupts on LPC

2006-03-20 by brendanmurphy37

Jaya,

Many thanks for your detailed explanation: things are becoming much 
clearer.

I apreciate that what you're presenting is "work-in-progress" and 
anything I say at this stage may be invalidated by subsequent 
information you provide, but based on the information you've 
provided, I'd have a couple of comments and questions.

The main main comment I'd make is that far from invalidating 
statements made by Philips, the empirical evidence you present 
actually re-inforces what they'e stated. The processor and VIC 
behave exactly as they have been documented; it's not clear how 
anything in the User Manual, App Notes or VIC documentation is in 
any way undermined or invalidated by the tests you've carried out.

Unfortunately, you have also yet to provide information on how these 
spurious interrupts may be prevented (e.g. how do you stop the UART 
operating as it was designed to?), nor are there are any details on 
why simple work-arounds like those presented in 
http://groups.yahoo.com/group/lpc2000/message/14342 are either 
incorrect or invalid.

As a final comment, I think it would be of more general use if you 
added information on why you believe spurious interrupts are such a 
major problem and the specific problems you see with other 
solutions, rathar than continuing to focus on whether it's a Philips 
or ARM issue.

I've added a couple of more detailed comments to your post below.

With best wishes

Brendan

--- In lpc2000@yahoogroups.com, Jayasooriah <jayasooriah@...> wrote:
>
> Hello,
> 
> Arising out of requests from a number of people, I have documented 
the root 
> cause of spurious interrupts on LPC based on my experiments with 
LPC2292 as 
> I see it.  You can find this document (in progress) at:
> 
>    http://www.cse.unsw.edu.au/~jayas/esdk/lpc2/spurious-irq.html
> 
> The root cause of these spurious interrupts does not lie in the 
interaction 
> of the ARM core with VIC as claimed by Philips.  Hence it is 
unlikely that 
> other ARM cores with VIC will suffer the these spurious interrupt 
problems.

It's not clear how any of the empirical evidence you present backs 
this statement: can you elaborate?

> 
> The root cause of spurious interrupts generated when VICINTCLEAR 
is used to 
> disable interrupts is the internal priority logic of the VIC as 
implemented 
> on the LPCs.

What your asking us to believe here is that having gone to the 
trouble and cost of licensing the VIC design from ARM, Phlips for 
some reason chose to change that design, with the effect of 
introducing some form of unexpected behaviour. Possible, I suppose, 
though most would see this is somewhat unlikely.

> 
> The root cause of spurious interrupts generated through 
interaction of RDA 
> and CTI for UART0/1 is the internal logic within these peripheral 
devices.
> 

This simply restates in another form information already provided in 
the User Manual and App note: the state of CTI can change as the VIC 
is responding to the interrupt. Nothing new here.

> I have not got around to documenting hazards arising out of work-
arounds as 
> suggested in AN10414.
> 
> However, given the framework I have described for creating these 
spurious 
> interrupts in a deterministic way, it is not hard for anyone to 
extend the 
> experiments to find out exactly what happens and work out 
strategies of 
> preventing them.
> 

It's useful I'm sure, though it's not clear where your work is going.

> For starters, I would not recommend anyone disable interrupts 
using the 
> VIC.  Use the F and I bits in CPSR instead.  They are there for 
this 
> purpose and they do not generate spurious interrupts.
> 

I'd agree here, though possibly for different reasons. We have coded 
very brief functions to disable and re-enable interrupts using the 
CPSR flags: these work on any ARM system (including those without 
VICs). However, there are cases when you need to disable interrupts 
from one peripheral, rathar than globally. In that case, it's 
usually best to disable them in the peripheral itself, rathar than 
the VIC.
Show quoted textHide quoted text
> Kind regards,
> 
> Jaya
>

Re: spurious interrupts on LPC

2006-03-20 by Jayasooriah

Dear Robert (from Philips),

I have presented my findings on what causes spurious interrupts on LPC 
family of processors, and how one can prevent their occurrences at (E&OE):

   http://www.cse.unsw.edu.au/~jayas/esdk/lpc2/spurious-irq.html

In the process of doing this, I needed to explain what is incorrect with 
the solution recommended in Philips Applicaiton Note 10414.  I have 
attached my summary below.

Under the circumstances, I would like to provide you (Philips) an 
opportunity to examine my analysis.  Could you kindly assist in passing on 
the reference to your technical people so that they can point out where the 
consider I have erred in relation to the conduct of the experiments, or in 
making conclusions from the results.

I conducted these deterministic experiments on LPC2292 with 14.7456 MHz 
crystal, with PLL and MAM in their reset state, that is disabled and with 
maximum delay, respectively.  The code runs entirely from on-chip RAM.

I am happy to consider all rebuttals, and amend this report of my findings.

Kind regards,

Jaya

>Spurious interrupts are generated on LPC family of processors under two 
>scenarios.  One of these presents itself when the VIC receives an 
>interrupt as it being disabled.  The other arises from the the transient 
>behaviour of the RDA and CTI interrupt sources that originate from its 
>UART0/1 peripheral devices.
>
>The solution proposed by Philips in AN10414 involves servicing spurious 
>interrupts by a parallel handler and involves polling and servicing of 
>interrupts from all sources within this handler.  This method does not 
>work in a system if interrupt nesting is allowed.
>
>The spurious interrupt handler operating in this way can result in the 
>generation of further spurious interrupts.
>
>It is possible to prevent spurious interrupts on LPC2000 by not using the 
>VIC to disable interrupts, using the I and F bits of CPSR 
>instead.  Interrupts can be disabled at the VIC if the interrupt sources 
>can be shut down by other means, for example by disabling interrupts at 
>the peripherals themselves.
>
>As some UART peripheral interrupts exhibits transient behaviour that is 
>not handled by the VIC by design, these interrupts cannot be handled 
>through the VIC if interrupts are nested.


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

Re: spurious interrupts on LPC

2006-03-20 by brendanmurphy37

Jaya,

Many thanks for providing additional information on the problems 
with spurious interrupts as you see them, and your proposed 
solutions.

Unfortunately, in the case of the UART sourced interrupt, it's no 
real solution simply to say "don't use the UART with receiver 
interrupts enabled". It also doesn't take account of other 
peripherals that may exhibit transient behaviour.

A simple, empty, default interrupt handler will enable you to use 
whatever interrupts you like. If you have information to the 
contrary, I'd be interested to hear it.

Thanks again for the interesting explanations.

Brendan

--- In lpc2000@yahoogroups.com, Jayasooriah <jayasooriah@...> wrote:
>
> Dear Robert (from Philips),
> 
> I have presented my findings on what causes spurious interrupts on 
LPC 
> family of processors, and how one can prevent their occurrences at 
(E&OE):
> 
>    http://www.cse.unsw.edu.au/~jayas/esdk/lpc2/spurious-irq.html
> 
> In the process of doing this, I needed to explain what is 
incorrect with 
> the solution recommended in Philips Applicaiton Note 10414.  I 
have 
> attached my summary below.
> 
> Under the circumstances, I would like to provide you (Philips) an 
> opportunity to examine my analysis.  Could you kindly assist in 
passing on 
> the reference to your technical people so that they can point out 
where the 
> consider I have erred in relation to the conduct of the 
experiments, or in 
> making conclusions from the results.
> 
> I conducted these deterministic experiments on LPC2292 with 
14.7456 MHz 
> crystal, with PLL and MAM in their reset state, that is disabled 
and with 
> maximum delay, respectively.  The code runs entirely from on-chip 
RAM.
> 
> I am happy to consider all rebuttals, and amend this report of my 
findings.
> 
> Kind regards,
> 
> Jaya
> 
> >Spurious interrupts are generated on LPC family of processors 
under two 
> >scenarios.  One of these presents itself when the VIC receives an 
> >interrupt as it being disabled.  The other arises from the the 
transient 
> >behaviour of the RDA and CTI interrupt sources that originate 
from its 
> >UART0/1 peripheral devices.
> >
> >The solution proposed by Philips in AN10414 involves servicing 
spurious 
> >interrupts by a parallel handler and involves polling and 
servicing of 
> >interrupts from all sources within this handler.  This method 
does not 
> >work in a system if interrupt nesting is allowed.
> >
> >The spurious interrupt handler operating in this way can result 
in the 
> >generation of further spurious interrupts.
> >
> >It is possible to prevent spurious interrupts on LPC2000 by not 
using the 
> >VIC to disable interrupts, using the I and F bits of CPSR 
> >instead.  Interrupts can be disabled at the VIC if the interrupt 
sources 
> >can be shut down by other means, for example by disabling 
interrupts at 
> >the peripherals themselves.
> >
> >As some UART peripheral interrupts exhibits transient behaviour 
that is 
> >not handled by the VIC by design, these interrupts cannot be 
handled 
> >through the VIC if interrupts are nested.
> 
> 
> Send instant messages to your online friends 
http://au.messenger.yahoo.com
>

Re: spurious interrupts on LPC

2006-03-22 by Jayasooriah

Hello,

Arising out of discussions with those conversant with PL192 design, I have 
added a new solution to the problem of spurious interrupts generated on LPC 
(which incorporates PL190) when an interrupt occurs as is being disabled by 
writing to VICINTCLEAR register.

The solution I have recommended is explained in:

   http://www.cse.unsw.edu.au/~jayas/esdk/lpc2/spurious-irq.html

I have amended my conclusions to reflect this new solution.  Robert (of 
Philips) please pass on the amendment to your people if they wish to rebut 
and/or otherwise amend my report above.

Kind regards,

Jaya

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

Re: spurious interrupts on LPC

2006-03-22 by brendanmurphy37

Jaya,

Rather than repeat myself (again!), please see:

http://groups.yahoo.com/group/lpc2000/message/14402

Regards
Brendan

--- In lpc2000@yahoogroups.com, Jayasooriah <jayasooriah@...> wrote:
>
> Hello,
> 
> Arising out of discussions with those conversant with PL192 design, 
I have 
> added a new solution to the problem of spurious interrupts 
generated on LPC 
> (which incorporates PL190) when an interrupt occurs as is being 
disabled by 
> writing to VICINTCLEAR register.
> 
> The solution I have recommended is explained in:
> 
>    http://www.cse.unsw.edu.au/~jayas/esdk/lpc2/spurious-irq.html
> 
> I have amended my conclusions to reflect this new solution.  Robert 
(of 
> Philips) please pass on the amendment to your people if they wish 
to rebut 
> and/or otherwise amend my report above.
> 
> Kind regards,
> 
> Jaya
> 
> Send instant messages to your online friends 
http://au.messenger.yahoo.com
>

Re: spurious interrupts on LPC

2006-03-22 by Jayasooriah

Dear Brendan,

You are repeating yourself.

I have seen your original post.  I do not feel like dwelling in politics.

I have made a technical report about spurious interrupts on LPC family 
based on experiments I conducted on LPC2292.  The code is available for 
anyone who wishes to verify my experiments.

If you thin there is an error in the report please be kind enough to point 
this out specifically and I will try explain it better in the report itself 
for the benefit of all.

Kind regards,

Jaya

--- In lpc2000@yahoogroups.com, "brendanmurphy37" <brendan.murphy@...> wrote:
 >
 >
 > Jaya,
 >
 > Rather than repeat myself (again!), please see:
 >
 > http://groups.yahoo.com/group/lpc2000/message/14402
 >
 > Regards
 > Brendan

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

Re: spurious interrupts on LPC

2006-03-22 by brendanmurphy37

Jaya,

I've no interest in politics, nor in proving or disproving what you 
say. 

The point I was making (repeatedly!) is that your "solution" for UART 
related spurious interrupts is in fact no solution, as it simply says 
don't use the relevant interrupt. This isn't very practical.

I've also asked you (again, repeatedly) for information on why you 
claim having an empty default interrupt handler won't work. I'm very 
interested in this, as it's currently in use; if it's likely to fail, 
I'd like to know about it.

Having said that, I would imagine most people are extremely tired of 
this topic at this stage, so if you don't want to answer, I'm sure no 
one will mind. I'm certainly happy enough to stop right now.

Keep up the good work.

Brendan

--- In lpc2000@yahoogroups.com, Jayasooriah <jayasooriah@...> wrote:
>
> Dear Brendan,
> 
> You are repeating yourself.
> 
> I have seen your original post.  I do not feel like dwelling in 
politics.
> 
> I have made a technical report about spurious interrupts on LPC 
family 
> based on experiments I conducted on LPC2292.  The code is available 
for 
> anyone who wishes to verify my experiments.
> 
> If you thin there is an error in the report please be kind enough 
to point 
> this out specifically and I will try explain it better in the 
report itself 
> for the benefit of all.
> 
> Kind regards,
> 
> Jaya
> 
> --- In lpc2000@yahoogroups.com, "brendanmurphy37" <brendan.murphy@> 
wrote:
>  >
>  >
>  > Jaya,
>  >
>  > Rather than repeat myself (again!), please see:
>  >
>  > http://groups.yahoo.com/group/lpc2000/message/14402
>  >
>  > Regards
>  > Brendan
> 
> Send instant messages to your online friends 
http://au.messenger.yahoo.com
>

Re: spurious interrupts on LPC

2006-03-23 by Jayasooriah

Dear Brendan,

It looks like you are asking for help, yet put on an air and this makes it 
difficult for anyone to help without a sour taste in the 
mouth.  Nonetheless I shall try to oblige ...

My solution for the UART DOES work and HAS BEEN ADOPTED by clients who will 
not tolerate spurious interrupts in their systems.  It depends on what the 
are is being used for its its limitation in relation to transient behaviour 
of its RDA/CTI interrupt sources.

If you recognise that it has a FIFO in the receive channel, and you have 
suitable timers operating in your system, you can poll the UART using these 
timers.  The most important point to note in any solution (from a spurious 
interrupts perspective) is that it should not result in the generation of 
spurious interrupts.  Hence I consider the work around given in Philips 
AN10414, which I believe is what you are proposing to do, not a solution.

If you allow transient interrupts into your system the problems you need to 
entertain may not limited to just spurious interrupts of the type that I 
demonstrated by way of experiment.  You have to look at the design of PL190 
itself to understand what else can happen.

Interim information I have suggests that PL192 can handle interrupts that 
exhibit transient behaviour by design.  You will note it does not have any 
default vector.  So one solution is to wait for the next iteration of 
silicon and hope Philips will incorporate PL192 -- you have to ask Philips.

The other solution is to look for other ARM variants after checking if they 
incorporate PL190 VIC (it has a default vector) and run the experiments I 
have provided on these to see if the same problem manifests on these other 
systems.

If you need further comment on your particular work-around, I recommend you 
seek professional advice.  This is as far as I am prepared to go in 
relation to free advice for your particular problem.

Kind regards,

Jaya

>Message: 14
>    Date: Wed, 22 Mar 2006 14:57:03 -0000
>    From: "brendanmurphy37" <brendan.murphy@...>
>Subject: Re: spurious interrupts on LPC
>
>
>Jaya,
>
>I've no interest in politics, nor in proving or disproving what you
>say.
>
>The point I was making (repeatedly!) is that your "solution" for UART
>related spurious interrupts is in fact no solution, as it simply says
>don't use the relevant interrupt. This isn't very practical.
>
>I've also asked you (again, repeatedly) for information on why you
>claim having an empty default interrupt handler won't work. I'm very
>interested in this, as it's currently in use; if it's likely to fail,
>I'd like to know about it.
>
>Having said that, I would imagine most people are extremely tired of
>this topic at this stage, so if you don't want to answer, I'm sure no
>one will mind. I'm certainly happy enough to stop right now.
>
>Keep up the good work.
>
>Brendan

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

Re: spurious interrupts on LPC

2006-03-23 by brendanmurphy37

Jaya,

I think there's a bit of a misunderstanding here. I wasn't claiming 
that your solution for UART interrupts didn't work. Also, I'm aware 
of how to write UART drivers that don't use interrupts. I have the 
good fortune to be part of a team of excellent engineers who can 
assist if required: no help needed thanks!

My point was that if there's an issue with some feature (in this case 
UART receive interrupts), it's no real solution just to say "don't 
use the feature". This isn't to say that you can't get a working 
system that doesn't use the feature. Sorry if this wasn't totally 
clear.

The fact is that most people will already have some form of interrupt-
driven UART driver to hand when they come to the LPC2000 series, 
particularly as the UARTs are compatible with industry standard 
registers etc. Hence my observation about practicality: it's a bit 
much to ask them to completely rewrite drivers to avoid interrupts, 
particularly when other solutions to the issue exist that don't 
require such radical change.

If you and your clients want to implement any solution you like, I've 
absolutely no problem with it, nor with validating or proving it 
incorrect. I don't have the time, and I'm really not that interested. 
I'm happy for you. Honestly!

This is an open forum however, and I presume you'd accept that it's 
open for anyone to put forward to alternative viewpoints and 
solutions to issues as they see them? Particularly if those solutions 
are somewhat simpler in both scope and realisation.

Which brings me to my second point, and again, I'm assuming there's 
some sort of misunderstanding involved.

Some time ago, I posted my own observations and proposed solution for 
spurious interrupts. I'm not claiming authorship of the solution by 
the way: all I was doing was trying to summarise information 
available elsewhere and the key points as I saw them. See: 
http://groups.yahoo.com/group/lpc2000/message/14342
This is not the same as app note AN10414, which is what you seem to 
think I'm proposing (according to your statement below). I even 
included in the post the entire source code for the solution – all 
four lines of it. You immediately came back and said that what I was 
proposing wouldn't work. I've been trying ever since to find out what 
exactly is the problem you see with it. Is there some failure mode 
you can describe where it doesn't work? is there some test you've 
done that shows it failing? My interest in persisting with this 
enquiry (and apologies for everyone reading all of this for the 
repetition involved) is that the solution is in use: if it's likely 
to fail I'd like to know about it. If there is some flaw, I have no 
problem in acknowledging it and adopting some other alternative 
solution (yours or someone else's). 

I've no interest in changing your or anyone else's mind or playing 
politics (or trading insults and abuse come to that). I'm not looking 
for advice, free or otherwise. Just in establishing two simple points:

- there are alternative viewpoints and solutions

- if there's a problem with a solution I'm using, I'd like to know 
what it is

That's all really.

Best wishes

Brendan

--- In lpc2000@yahoogroups.com, Jayasooriah <jayasooriah@...> wrote:
>
> Dear Brendan,
> 
> It looks like you are asking for help, yet put on an air and this 
makes it 
> difficult for anyone to help without a sour taste in the 
> mouth.  Nonetheless I shall try to oblige ...
> 
> My solution for the UART DOES work and HAS BEEN ADOPTED by clients 
who will 
> not tolerate spurious interrupts in their systems.  It depends on 
what the 
> are is being used for its its limitation in relation to transient 
behaviour 
> of its RDA/CTI interrupt sources.
> 
> If you recognise that it has a FIFO in the receive channel, and you 
have 
> suitable timers operating in your system, you can poll the UART 
using these 
> timers.  The most important point to note in any solution (from a 
spurious 
> interrupts perspective) is that it should not result in the 
generation of 
> spurious interrupts.  Hence I consider the work around given in 
Philips 
> AN10414, which I believe is what you are proposing to do, not a 
solution.
> 
> If you allow transient interrupts into your system the problems you 
need to 
> entertain may not limited to just spurious interrupts of the type 
that I 
> demonstrated by way of experiment.  You have to look at the design 
of PL190 
> itself to understand what else can happen.
> 
> Interim information I have suggests that PL192 can handle 
interrupts that 
> exhibit transient behaviour by design.  You will note it does not 
have any 
> default vector.  So one solution is to wait for the next iteration 
of 
> silicon and hope Philips will incorporate PL192 -- you have to ask 
Philips.
> 
> The other solution is to look for other ARM variants after checking 
if they 
> incorporate PL190 VIC (it has a default vector) and run the 
experiments I 
> have provided on these to see if the same problem manifests on 
these other 
> systems.
> 
> If you need further comment on your particular work-around, I 
recommend you 
> seek professional advice.  This is as far as I am prepared to go in 
> relation to free advice for your particular problem.
> 
> Kind regards,
> 
> Jaya
> 
> >Message: 14
> >    Date: Wed, 22 Mar 2006 14:57:03 -0000
> >    From: "brendanmurphy37" <brendan.murphy@...>
> >Subject: Re: spurious interrupts on LPC
> >
> >
> >Jaya,
> >
> >I've no interest in politics, nor in proving or disproving what you
> >say.
> >
> >The point I was making (repeatedly!) is that your "solution" for 
UART
> >related spurious interrupts is in fact no solution, as it simply 
says
> >don't use the relevant interrupt. This isn't very practical.
> >
> >I've also asked you (again, repeatedly) for information on why you
> >claim having an empty default interrupt handler won't work. I'm 
very
> >interested in this, as it's currently in use; if it's likely to 
fail,
> >I'd like to know about it.
> >
> >Having said that, I would imagine most people are extremely tired 
of
> >this topic at this stage, so if you don't want to answer, I'm sure 
no
> >one will mind. I'm certainly happy enough to stop right now.
> >
> >Keep up the good work.
> >
> >Brendan
> 
> Send instant messages to your online friends 
http://au.messenger.yahoo.com
>

Re: spurious interrupts on LPC

2006-03-23 by Jayasooriah

Brendan,

If there is a question for me here, please tell me what it is.  If not, I 
hope you will forgive me for ignoring this post.

Kind regards,

Jaya

--- In lpc2000@yahoogroups.com, "brendanmurphy37" <brendan.murphy@...> wrote:
 >
 > Jaya,
 >
 > I think there's a bit of a misunderstanding here. I wasn't claiming
 > that your solution for UART interrupts didn't work. Also, I'm aware
 > of how to write UART drivers that don't use interrupts. I have the
 > good fortune to be part of a team of excellent engineers who can
 > assist if required: no help needed thanks!
 >
 > My point was that if there's an issue with some feature (in this case
 > UART receive interrupts), it's no real solution just to say "don't
 > use the feature". This isn't to say that you can't get a working
 > system that doesn't use the feature. Sorry if this wasn't totally
 > clear.
 >
 > The fact is that most people will already have some form of interrupt-
 > driven UART driver to hand when they come to the LPC2000 series,
 > particularly as the UARTs are compatible with industry standard
 > registers etc. Hence my observation about practicality: it's a bit
 > much to ask them to completely rewrite drivers to avoid interrupts,
 > particularly when other solutions to the issue exist that don't
 > require such radical change.
 >
 > If you and your clients want to implement any solution you like, I've
 > absolutely no problem with it, nor with validating or proving it
 > incorrect. I don't have the time, and I'm really not that interested.
 > I'm happy for you. Honestly!
 >
 > This is an open forum however, and I presume you'd accept that it's
 > open for anyone to put forward to alternative viewpoints and
 > solutions to issues as they see them? Particularly if those solutions
 > are somewhat simpler in both scope and realisation.
 >
 > Which brings me to my second point, and again, I'm assuming there's
 > some sort of misunderstanding involved.
 >
 > Some time ago, I posted my own observations and proposed solution for
 > spurious interrupts. I'm not claiming authorship of the solution by
 > the way: all I was doing was trying to summarise information
 > available elsewhere and the key points as I saw them. See:
 > http://groups.yahoo.com/group/lpc2000/message/14342
 > This is not the same as app note AN10414, which is what you seem to
 > think I'm proposing (according to your statement below). I even
 > included in the post the entire source code for the solution – all
 > four lines of it. You immediately came back and said that what I was
 > proposing wouldn't work. I've been trying ever since to find out what
 > exactly is the problem you see with it. Is there some failure mode
 > you can describe where it doesn't work? is there some test you've
 > done that shows it failing? My interest in persisting with this
 > enquiry (and apologies for everyone reading all of this for the
 > repetition involved) is that the solution is in use: if it's likely
 > to fail I'd like to know about it. If there is some flaw, I have no
 > problem in acknowledging it and adopting some other alternative
 > solution (yours or someone else's).
 >
 > I've no interest in changing your or anyone else's mind or playing
 > politics (or trading insults and abuse come to that). I'm not looking
 > for advice, free or otherwise. Just in establishing two simple points:
 >
 > - there are alternative viewpoints and solutions
 >
 > - if there's a problem with a solution I'm using, I'd like to know
 > what it is
 >
 > That's all really.
 >
 > Best wishes
 >
 > Brendan

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

Re: spurious interrupts on LPC

2006-03-23 by Guillermo Prandi

I'd like to point out that apparently (correct me if I'm wrong!) Jaya 
is radically against system that tolerate any interrupts whose source 
is unidentifiable. Apparently his products must pass some 
certification process that rejects this situation. Brendan's proposal 
is a solution to the problem "how to get a system running using UART 
interrupts", and what Jaya is proposing is a solution to the 
problem "how to get a system running so you never get an interrupt 
whose source you can't identify". It is clear that Brendan doesn't 
think that interrupts from unidentifiable sources are not that much 
of a problem. Hence the misunderstanding (unless I just added a new 
degree of misunderstanding; if that is case, my apologies).

Guille

--- In lpc2000@yahoogroups.com, "brendanmurphy37" 
<brendan.murphy@...> wrote:
>
> 
> Jaya,
> 
> I think there's a bit of a misunderstanding here. I wasn't claiming 
> that your solution for UART interrupts didn't work. Also, I'm aware 
> of how to write UART drivers that don't use interrupts. I have the 
> good fortune to be part of a team of excellent engineers who can 
> assist if required: no help needed thanks!
> 
> My point was that if there's an issue with some feature (in this 
case 
> UART receive interrupts), it's no real solution just to say "don't 
> use the feature". This isn't to say that you can't get a working 
> system that doesn't use the feature. Sorry if this wasn't totally 
> clear.
> 
> The fact is that most people will already have some form of 
interrupt-
> driven UART driver to hand when they come to the LPC2000 series, 
> particularly as the UARTs are compatible with industry standard 
> registers etc. Hence my observation about practicality: it's a bit 
> much to ask them to completely rewrite drivers to avoid interrupts, 
> particularly when other solutions to the issue exist that don't 
> require such radical change.
> 
> If you and your clients want to implement any solution you like, 
I've 
> absolutely no problem with it, nor with validating or proving it 
> incorrect. I don't have the time, and I'm really not that 
interested. 
> I'm happy for you. Honestly!
> 
> This is an open forum however, and I presume you'd accept that it's 
> open for anyone to put forward to alternative viewpoints and 
> solutions to issues as they see them? Particularly if those 
solutions 
> are somewhat simpler in both scope and realisation.
> 
> Which brings me to my second point, and again, I'm assuming there's 
> some sort of misunderstanding involved.
> 
> Some time ago, I posted my own observations and proposed solution 
for 
> spurious interrupts. I'm not claiming authorship of the solution by 
> the way: all I was doing was trying to summarise information 
> available elsewhere and the key points as I saw them. See: 
> http://groups.yahoo.com/group/lpc2000/message/14342
> This is not the same as app note AN10414, which is what you seem to 
> think I'm proposing (according to your statement below). I even 
> included in the post the entire source code for the solution – all 
> four lines of it. You immediately came back and said that what I 
was 
> proposing wouldn't work. I've been trying ever since to find out 
what 
> exactly is the problem you see with it. Is there some failure mode 
> you can describe where it doesn't work? is there some test you've 
> done that shows it failing? My interest in persisting with this 
> enquiry (and apologies for everyone reading all of this for the 
> repetition involved) is that the solution is in use: if it's likely 
> to fail I'd like to know about it. If there is some flaw, I have no 
> problem in acknowledging it and adopting some other alternative 
> solution (yours or someone else's). 
> 
> I've no interest in changing your or anyone else's mind or playing 
> politics (or trading insults and abuse come to that). I'm not 
looking 
> for advice, free or otherwise. Just in establishing two simple 
points:
> 
> - there are alternative viewpoints and solutions
> 
> - if there's a problem with a solution I'm using, I'd like to know 
> what it is
> 
> That's all really.
> 
> Best wishes
> 
> Brendan
> 
> --- In lpc2000@yahoogroups.com, Jayasooriah <jayasooriah@> wrote:
> >
> > Dear Brendan,
> > 
> > It looks like you are asking for help, yet put on an air and this 
> makes it 
> > difficult for anyone to help without a sour taste in the 
> > mouth.  Nonetheless I shall try to oblige ...
> > 
> > My solution for the UART DOES work and HAS BEEN ADOPTED by 
clients 
> who will 
> > not tolerate spurious interrupts in their systems.  It depends on 
> what the 
> > are is being used for its its limitation in relation to transient 
> behaviour 
> > of its RDA/CTI interrupt sources.
> > 
> > If you recognise that it has a FIFO in the receive channel, and 
you 
> have 
> > suitable timers operating in your system, you can poll the UART 
> using these 
> > timers.  The most important point to note in any solution (from a 
> spurious 
> > interrupts perspective) is that it should not result in the 
> generation of 
> > spurious interrupts.  Hence I consider the work around given in 
> Philips 
> > AN10414, which I believe is what you are proposing to do, not a 
> solution.
> > 
> > If you allow transient interrupts into your system the problems 
you 
> need to 
> > entertain may not limited to just spurious interrupts of the type 
> that I 
> > demonstrated by way of experiment.  You have to look at the 
design 
> of PL190 
> > itself to understand what else can happen.
> > 
> > Interim information I have suggests that PL192 can handle 
> interrupts that 
> > exhibit transient behaviour by design.  You will note it does not 
> have any 
> > default vector.  So one solution is to wait for the next 
iteration 
> of 
> > silicon and hope Philips will incorporate PL192 -- you have to 
ask 
> Philips.
> > 
> > The other solution is to look for other ARM variants after 
checking 
> if they 
> > incorporate PL190 VIC (it has a default vector) and run the 
> experiments I 
> > have provided on these to see if the same problem manifests on 
> these other 
> > systems.
> > 
> > If you need further comment on your particular work-around, I 
> recommend you 
> > seek professional advice.  This is as far as I am prepared to go 
in 
> > relation to free advice for your particular problem.
> > 
> > Kind regards,
> > 
> > Jaya
> > 
> > >Message: 14
> > >    Date: Wed, 22 Mar 2006 14:57:03 -0000
> > >    From: "brendanmurphy37" <brendan.murphy@>
> > >Subject: Re: spurious interrupts on LPC
> > >
> > >
> > >Jaya,
> > >
> > >I've no interest in politics, nor in proving or disproving what 
you
> > >say.
> > >
> > >The point I was making (repeatedly!) is that your "solution" for 
> UART
> > >related spurious interrupts is in fact no solution, as it simply 
> says
> > >don't use the relevant interrupt. This isn't very practical.
> > >
> > >I've also asked you (again, repeatedly) for information on why 
you
> > >claim having an empty default interrupt handler won't work. I'm 
> very
> > >interested in this, as it's currently in use; if it's likely to 
> fail,
> > >I'd like to know about it.
> > >
> > >Having said that, I would imagine most people are extremely 
tired 
> of
> > >this topic at this stage, so if you don't want to answer, I'm 
sure 
Show quoted textHide quoted text
> no
> > >one will mind. I'm certainly happy enough to stop right now.
> > >
> > >Keep up the good work.
> > >
> > >Brendan
> > 
> > Send instant messages to your online friends 
> http://au.messenger.yahoo.com
> >
>

Re: spurious interrupts on LPC

2006-03-23 by brendanmurphy37

Jaya,

OK, I'll repeat it again!

You have claimed that a solution I proposed in the post

http://groups.yahoo.com/group/lpc2000/message/14342

does not work. You were quite emphatic on this point.

My question is what evidence do you have for your claim?

As I've pointed out, the code is quite simple. Is there some failure 
mode you can describe where it doesn't work? Is there some test 
you've done that shows it failing? 

I'm afraid that's about as simple as I can make it.

Looking forward to your response.

Regards
Brendan


--- In lpc2000@yahoogroups.com, Jayasooriah <jayasooriah@...> wrote:
>
> Brendan,
> 
> If there is a question for me here, please tell me what it is.  If 
not, I 
> hope you will forgive me for ignoring this post.
> 
> Kind regards,
> 
> Jaya
> 
> --- In lpc2000@yahoogroups.com, "brendanmurphy37" <brendan.murphy@> 
wrote:
>  >
>  > Jaya,
>  >
>  > I think there's a bit of a misunderstanding here. I wasn't 
claiming
>  > that your solution for UART interrupts didn't work. Also, I'm 
aware
>  > of how to write UART drivers that don't use interrupts. I have 
the
>  > good fortune to be part of a team of excellent engineers who can
>  > assist if required: no help needed thanks!
>  >
>  > My point was that if there's an issue with some feature (in this 
case
>  > UART receive interrupts), it's no real solution just to 
say "don't
>  > use the feature". This isn't to say that you can't get a working
>  > system that doesn't use the feature. Sorry if this wasn't totally
>  > clear.
>  >
>  > The fact is that most people will already have some form of 
interrupt-
>  > driven UART driver to hand when they come to the LPC2000 series,
>  > particularly as the UARTs are compatible with industry standard
>  > registers etc. Hence my observation about practicality: it's a 
bit
>  > much to ask them to completely rewrite drivers to avoid 
interrupts,
>  > particularly when other solutions to the issue exist that don't
>  > require such radical change.
>  >
>  > If you and your clients want to implement any solution you like, 
I've
>  > absolutely no problem with it, nor with validating or proving it
>  > incorrect. I don't have the time, and I'm really not that 
interested.
>  > I'm happy for you. Honestly!
>  >
>  > This is an open forum however, and I presume you'd accept that 
it's
>  > open for anyone to put forward to alternative viewpoints and
>  > solutions to issues as they see them? Particularly if those 
solutions
>  > are somewhat simpler in both scope and realisation.
>  >
>  > Which brings me to my second point, and again, I'm assuming 
there's
>  > some sort of misunderstanding involved.
>  >
>  > Some time ago, I posted my own observations and proposed 
solution for
>  > spurious interrupts. I'm not claiming authorship of the solution 
by
>  > the way: all I was doing was trying to summarise information
>  > available elsewhere and the key points as I saw them. See:
>  > http://groups.yahoo.com/group/lpc2000/message/14342
>  > This is not the same as app note AN10414, which is what you seem 
to
>  > think I'm proposing (according to your statement below). I even
>  > included in the post the entire source code for the solution – 
all
>  > four lines of it. You immediately came back and said that what I 
was
>  > proposing wouldn't work. I've been trying ever since to find out 
what
>  > exactly is the problem you see with it. Is there some failure 
mode
>  > you can describe where it doesn't work? is there some test you've
>  > done that shows it failing? My interest in persisting with this
>  > enquiry (and apologies for everyone reading all of this for the
>  > repetition involved) is that the solution is in use: if it's 
likely
>  > to fail I'd like to know about it. If there is some flaw, I have 
no
>  > problem in acknowledging it and adopting some other alternative
>  > solution (yours or someone else's).
>  >
>  > I've no interest in changing your or anyone else's mind or 
playing
>  > politics (or trading insults and abuse come to that). I'm not 
looking
>  > for advice, free or otherwise. Just in establishing two simple 
points:
>  >
>  > - there are alternative viewpoints and solutions
>  >
>  > - if there's a problem with a solution I'm using, I'd like to 
know
>  > what it is
>  >
>  > That's all really.
>  >
>  > Best wishes
>  >
>  > Brendan
> 
> Send instant messages to your online friends 
http://au.messenger.yahoo.com
>

Re: spurious interrupts on LPC

2006-03-23 by brendanmurphy37

Guille,

Thanks for the observation: it's probably close enough to the mark 
OK. 

I wouldn't quite say I don't think spurious interrupts aren't a 
problem, and it wouldn't be better to avoid them: clearly the answer 
to this is "yes". I think Jaya's work is helpful in documenting how 
this might be done.

However, given that the source of the interrupts is well documented, 
and the fact that they're extremely rare (from memory we saw maybe 
one in 100 million interrupts as spurious), providing an empty 
handler for them seemed a reasonable approach. The handler gets 
called when a spurious interrupt happens (i.e. VIC fails to identify 
the source). If the source of the interrupt is still valid, the 
normal interrupt handler for the event will get called subsequently.

What I'm finding somewhat frustrating is that I'm been told that this 
approach is somehow flawed, without being told why or how.

I also have to say I find it somewhat difficult in framing my points 
without continually provoking an adversarial or abusive reaction from 
Jaya.

Thanks for your attempt to calm the waters, in any case.

Regards
Brendan


--- In lpc2000@yahoogroups.com, "Guillermo Prandi" 
<yahoo.messenger@...> wrote:
>
> I'd like to point out that apparently (correct me if I'm wrong!) 
Jaya 
> is radically against system that tolerate any interrupts whose 
source 
> is unidentifiable. Apparently his products must pass some 
> certification process that rejects this situation. Brendan's 
proposal 
> is a solution to the problem "how to get a system running using 
UART 
Show quoted textHide quoted text
> interrupts", and what Jaya is proposing is a solution to the 
> problem "how to get a system running so you never get an interrupt 
> whose source you can't identify". It is clear that Brendan doesn't 
> think that interrupts from unidentifiable sources are not that much 
> of a problem. Hence the misunderstanding (unless I just added a new 
> degree of misunderstanding; if that is case, my apologies).
> 
> Guille
>

Re: [lpc2000] Re: spurious interrupts on LPC

2006-03-23 by Ralph Hempel

Honestly, this is getting ridiculous.

I actually read this thread just in case some nugget of
information pops out :-)

I've been writing code for embedded systems for 20 years and
have seen a lot of failures and issues with root causes in
the interrupt handlers. I'll try to find common ground in
both positions so we can give this dead horse a decent burial.

I've read Jaya's note on spurious IRQs at:

<http://www.cse.unsw.edu.au/~jayas/esdk/lpc2/spurious-irq.html>

In short, he describes how VIC interrupt handlers are supposed
to work, and provides short, simple, bits of code that can be
easily understood.

He then moves on to "surprise" interrupts, where he identifies
the possibility that an interrupt handler may see the I bits in
both SPSR and CPSR set at the same time if a disable CPU interrupt
instruction is in the pipeline when the VIC interrupt is taken.

He correctly identifies the fact that the handler should not
use the state of the SPSR I bit to determine if it was invoked
at interrupt time.

So far so good.

He then shows how to force the VIC to generate a spurious interrupt,
and states:

   "To avoid generation of such spurious interrupts in a system,
    we must ensure no interrupt source exhibits transient behaviour,
    and we should only clear the software interrupt in the interrupt
    service routine."

OK. So you can write a handler that only clears the software
interrupt in the interrupt service routine, but you can't guarantee
that other interrupt sources don't have transient behavior.

He also states in the section on the AN10414 Solution that:

   "The implication here is that a surprise event generates only
    one interrupt, and that this is a spurious interrupt.  However,
    our experiment shows that such a surprise event generates two
    successive interrupts,  a spurious interrupt followed by a
    regular external interrupt.

So, you don't lose the original interrupt, you just get a
spurious one to whatever the default vector is FIRST.

If I'm reading it correctly, Jaya's solution to spurious interrupts
is to disable ALL interrupts when handling ANY interrupt.

This is simply impractical in many applications.

Now, from Brendan's point of view, I think I hear him saying that
spurious interrupts are a fact of life in the VIC, and that you get
the correct one afterwards anyways.

To make things very simple, we just accept that a spurious interrupt
might happen, and deal with it as quickly as possible, then handle the
real interrupt that is sure to follow.

I've been putting default handlers for unexpected sources for years.

During the debug phase of the project, they point to a handler that
logs the event and halts the system so I can figure out what
happened and analyse the impact on the system.

For production, we just log the event and return to normal operation.

Brendan's solution of being aware of the problem and forcing
the default vector to a null handler is fine, from my point of view.

If Jaya's customers don't like spurious interrupts, then they can
either use Jaya's solution, or switch chip architectures.

If Jaya's solution means the application does not meet real-time
commitments then his customers can either choose Brendan's
solution or switch chip architectures.

Jaya, I think Brendan is simply asking for proof one way or
another that having a null handler for the VIC default vector
is not going to work.

If you can provide solid proof with a reproducible example, then
do so. He's not asking you to do his failure analysis for free,
he's asking you to back up your statement that his solution is
wrong with more than just handwaving.

Brendan, I think Jaya believes that the only way to prevent
spurious interrupts is to disable interrupts at the processor
level when handling interrupts.

It works, it's just that you (and many others) think it's
impractical.

I think that we'll all have to agree to disagree on the "correct"
solution to the problem. Like many engineering tradeoffs, this
one must be balanced by each individual on its own merits.

Ralph Hempel - P.Eng.

Re: spurious interrupts on LPC

2006-03-23 by ian.scanlon

Jayasooriah,

You have to be one on the most annoying, arrogant and pompous people 
I have encountered.  You have created a problem out of nothing, a 
issue you described in you first post as having be discussed 
previously.  You have taken a preposterous position, initially 
demanding that Philips explain themselves and justify their design.  
All information, ideas and discussion that has not been a direct 
challenge has been ignored, or dismissed. You have challenged people 
to dispute your position rather then discuss it. When nobody was 
interested and your attempts to antagonize and bait people back into 
the dispute failed, you twisted the issue and started the name 
calling again. You and you alone have perpetuated the issue. You 
created a bizarre situation where in the end you come in, save the 
day and become the expert.  You have once again defeated the sinister 
Philips empire. You have made a good attempt at drawing all of us 
foolish designers out of the debilitating grip of the evil LPC family.

So Yes!  You are the master of the * spurious interrupts *.  You 
should be tired of everyone draining your energy with their foolish 
questions.  You *should* be regarded as an expert with every piece of 
information and opinion that spews from your person.  The arrogant 
fools should ignore their own practical experience and knowledge of 
embedded systems and rely on the bits and pieces of information you 
have collected in your strange academic pursuits.

This thread did have some useful and very valid information.  It also 
had some solutions, but it takes a fair bit of work to separate these 
things from all the background noise you create.

The last one of these threads that you managed to keep going degraded 
into name calling and then, when there was nothing else to say,  you 
started correcting peoples speling !  How do you get any work 
done ??!!

I am sure that there must be something that you can contribute to 
this group.  The paper you posted may be useful and might be the best 
way for you to approach these "issues" you have.  Perhaps start a 
thread with "I have researched a problem I have  with .... .Does 
anybody else have the same problem? I might be able to offer some 
insight and maybe even some help."

I also recommend that with the more serious problems, you contact the 
board of directors at Philips directly.


Best of luck.

With kindest regards,
Ian Scanlon




--- In lpc2000@yahoogroups.com, Jayasooriah <jayasooriah@...> wrote:
>
> Brendan,
> 
> If there is a question for me here, please tell me what it is.  If 
not, I 
> hope you will forgive me for ignoring this post.
> 
> Kind regards,
> 
> Jaya
> 
> --- In lpc2000@yahoogroups.com, "brendanmurphy37" <brendan.murphy@> 
wrote:
>  >
>  > Jaya,
>  >
>  > I think there's a bit of a misunderstanding here. I wasn't 
claiming
>  > that your solution for UART interrupts didn't work. Also, I'm 
aware
>  > of how to write UART drivers that don't use interrupts. I have 
the
>  > good fortune to be part of a team of excellent engineers who can
>  > assist if required: no help needed thanks!
>  >
>  > My point was that if there's an issue with some feature (in this 
case
>  > UART receive interrupts), it's no real solution just to 
say "don't
>  > use the feature". This isn't to say that you can't get a working
>  > system that doesn't use the feature. Sorry if this wasn't totally
>  > clear.
>  >
>  > The fact is that most people will already have some form of 
interrupt-
>  > driven UART driver to hand when they come to the LPC2000 series,
>  > particularly as the UARTs are compatible with industry standard
>  > registers etc. Hence my observation about practicality: it's a 
bit
>  > much to ask them to completely rewrite drivers to avoid 
interrupts,
>  > particularly when other solutions to the issue exist that don't
>  > require such radical change.
>  >
>  > If you and your clients want to implement any solution you like, 
I've
>  > absolutely no problem with it, nor with validating or proving it
>  > incorrect. I don't have the time, and I'm really not that 
interested.
>  > I'm happy for you. Honestly!
>  >
>  > This is an open forum however, and I presume you'd accept that 
it's
>  > open for anyone to put forward to alternative viewpoints and
>  > solutions to issues as they see them? Particularly if those 
solutions
>  > are somewhat simpler in both scope and realisation.
>  >
>  > Which brings me to my second point, and again, I'm assuming 
there's
>  > some sort of misunderstanding involved.
>  >
>  > Some time ago, I posted my own observations and proposed 
solution for
>  > spurious interrupts. I'm not claiming authorship of the solution 
by
>  > the way: all I was doing was trying to summarise information
>  > available elsewhere and the key points as I saw them. See:
>  > http://groups.yahoo.com/group/lpc2000/message/14342
>  > This is not the same as app note AN10414, which is what you seem 
to
>  > think I'm proposing (according to your statement below). I even
>  > included in the post the entire source code for the solution – 
all
>  > four lines of it. You immediately came back and said that what I 
was
>  > proposing wouldn't work. I've been trying ever since to find out 
what
>  > exactly is the problem you see with it. Is there some failure 
mode
>  > you can describe where it doesn't work? is there some test you've
>  > done that shows it failing? My interest in persisting with this
>  > enquiry (and apologies for everyone reading all of this for the
>  > repetition involved) is that the solution is in use: if it's 
likely
>  > to fail I'd like to know about it. If there is some flaw, I have 
no
>  > problem in acknowledging it and adopting some other alternative
>  > solution (yours or someone else's).
>  >
>  > I've no interest in changing your or anyone else's mind or 
playing
>  > politics (or trading insults and abuse come to that). I'm not 
looking
>  > for advice, free or otherwise. Just in establishing two simple 
points:
>  >
>  > - there are alternative viewpoints and solutions
>  >
>  > - if there's a problem with a solution I'm using, I'd like to 
know
>  > what it is
>  >
>  > That's all really.
>  >
>  > Best wishes
>  >
>  > Brendan
> 
> Send instant messages to your online friends 
http://au.messenger.yahoo.com
>

Re: spurious interrupts on LPC

2006-03-23 by brendanmurphy37

Ralph,

Many, many, thanks for your analysis: your explanation of my position 
is 100% accurate (in fact you do it better than I did, which might 
explain why this has gone on so long).

I think you've also done a fair analysis of Jaya's position (with 
which I've no argument): if he feels he can't live with spurious 
interrupts, that's fine. I genuinely mean it when I said I think his 
work is useful: any push that makes micros better, less prone 
to "quirks" etc. is all for the good. 

Unfortunately, we have to live with the products that are on the 
market today, not some idealised version that's theoretically 
possible, much as we'd like them. Hence my sharing of what we chose 
as a pragmatic solution, which as you (and others) have pointed out, 
is a well-established practice in any case. 

As an aside on this general theme, I think the Philips parts are 
about (or above) average in terms of their quirks.

Thanks again for taking the trouble with your message.

Brendan

--- In lpc2000@yahoogroups.com, Ralph Hempel <rhempel@...> wrote:
>
> Honestly, this is getting ridiculous.
> 
> I actually read this thread just in case some nugget of
> information pops out :-)
> 
> I've been writing code for embedded systems for 20 years and
> have seen a lot of failures and issues with root causes in
> the interrupt handlers. I'll try to find common ground in
> both positions so we can give this dead horse a decent burial.
> 
> I've read Jaya's note on spurious IRQs at:
> 
> <http://www.cse.unsw.edu.au/~jayas/esdk/lpc2/spurious-irq.html>
> 
> In short, he describes how VIC interrupt handlers are supposed
> to work, and provides short, simple, bits of code that can be
> easily understood.
> 
> He then moves on to "surprise" interrupts, where he identifies
> the possibility that an interrupt handler may see the I bits in
> both SPSR and CPSR set at the same time if a disable CPU interrupt
> instruction is in the pipeline when the VIC interrupt is taken.
> 
> He correctly identifies the fact that the handler should not
> use the state of the SPSR I bit to determine if it was invoked
> at interrupt time.
> 
> So far so good.
> 
> He then shows how to force the VIC to generate a spurious interrupt,
> and states:
> 
>    "To avoid generation of such spurious interrupts in a system,
>     we must ensure no interrupt source exhibits transient behaviour,
>     and we should only clear the software interrupt in the interrupt
>     service routine."
> 
> OK. So you can write a handler that only clears the software
> interrupt in the interrupt service routine, but you can't guarantee
> that other interrupt sources don't have transient behavior.
> 
> He also states in the section on the AN10414 Solution that:
> 
>    "The implication here is that a surprise event generates only
>     one interrupt, and that this is a spurious interrupt.  However,
>     our experiment shows that such a surprise event generates two
>     successive interrupts,  a spurious interrupt followed by a
>     regular external interrupt.
> 
> So, you don't lose the original interrupt, you just get a
> spurious one to whatever the default vector is FIRST.
> 
> If I'm reading it correctly, Jaya's solution to spurious interrupts
> is to disable ALL interrupts when handling ANY interrupt.
> 
> This is simply impractical in many applications.
> 
> Now, from Brendan's point of view, I think I hear him saying that
> spurious interrupts are a fact of life in the VIC, and that you get
> the correct one afterwards anyways.
> 
> To make things very simple, we just accept that a spurious interrupt
> might happen, and deal with it as quickly as possible, then handle 
the
> real interrupt that is sure to follow.
> 
> I've been putting default handlers for unexpected sources for years.
> 
> During the debug phase of the project, they point to a handler that
> logs the event and halts the system so I can figure out what
> happened and analyse the impact on the system.
> 
> For production, we just log the event and return to normal 
operation.
Show quoted textHide quoted text
> 
> Brendan's solution of being aware of the problem and forcing
> the default vector to a null handler is fine, from my point of view.
> 
> If Jaya's customers don't like spurious interrupts, then they can
> either use Jaya's solution, or switch chip architectures.
> 
> If Jaya's solution means the application does not meet real-time
> commitments then his customers can either choose Brendan's
> solution or switch chip architectures.
> 
> Jaya, I think Brendan is simply asking for proof one way or
> another that having a null handler for the VIC default vector
> is not going to work.
> 
> If you can provide solid proof with a reproducible example, then
> do so. He's not asking you to do his failure analysis for free,
> he's asking you to back up your statement that his solution is
> wrong with more than just handwaving.
> 
> Brendan, I think Jaya believes that the only way to prevent
> spurious interrupts is to disable interrupts at the processor
> level when handling interrupts.
> 
> It works, it's just that you (and many others) think it's
> impractical.
> 
> I think that we'll all have to agree to disagree on the "correct"
> solution to the problem. Like many engineering tradeoffs, this
> one must be balanced by each individual on its own merits.
> 
> Ralph Hempel - P.Eng.
>

Re: spurious interrupts on LPC

2006-03-23 by unity0724

Umm...  2 solutions for the "root" of the problem??

Option 1:
If an O/S cannot work with the LPC2xxx chip, throw away the 
LPC2xxx chip.  Why want to patch the O/S code to make it 
functioning with LPC2xxx?  Can that O/S be then *CERTIFIED* to be
reliable after that *Spurious Interrupt* code patch??
=> Why NOT pick some other vendor's chip.   Are ARM7 chips from
Atmel,STMicro,Sharp,CirrusLogic or TI inferior to Philips Chips??

Option 2:
3000 members here and eCos, uCLinux, FreeRTOS do not have problem
with the LPC2xxx Chip's Spurious Interrupt. => So Trash that O/S...

If you have another option, let me know...  :)
Regards


--- In lpc2000@yahoogroups.com, "brendanmurphy37" 
<brendan.murphy@...> wrote:
>
> 
> Ralph,
> 
> Many, many, thanks for your analysis: your explanation of my 
position 
> is 100% accurate (in fact you do it better than I did, which might 
> explain why this has gone on so long).
> 
> I think you've also done a fair analysis of Jaya's position (with 
> which I've no argument): if he feels he can't live with spurious 
> interrupts, that's fine. I genuinely mean it when I said I think 
his 
> work is useful: any push that makes micros better, less prone 
> to "quirks" etc. is all for the good. 
> 
> Unfortunately, we have to live with the products that are on the 
> market today, not some idealised version that's theoretically 
> possible, much as we'd like them. Hence my sharing of what we 
chose 
> as a pragmatic solution, which as you (and others) have pointed 
out, 
> is a well-established practice in any case. 
> 
> As an aside on this general theme, I think the Philips parts are 
> about (or above) average in terms of their quirks.
> 
> Thanks again for taking the trouble with your message.
> 
> Brendan
> 
> --- In lpc2000@yahoogroups.com, Ralph Hempel <rhempel@> wrote:
> >
> > Honestly, this is getting ridiculous.
> > 
> > I actually read this thread just in case some nugget of
> > information pops out :-)
> > 
> > I've been writing code for embedded systems for 20 years and
> > have seen a lot of failures and issues with root causes in
> > the interrupt handlers. I'll try to find common ground in
> > both positions so we can give this dead horse a decent burial.
> > 
> > I've read Jaya's note on spurious IRQs at:
> > 
> > <http://www.cse.unsw.edu.au/~jayas/esdk/lpc2/spurious-irq.html>
> > 
> > In short, he describes how VIC interrupt handlers are supposed
> > to work, and provides short, simple, bits of code that can be
> > easily understood.
> > 
> > He then moves on to "surprise" interrupts, where he identifies
> > the possibility that an interrupt handler may see the I bits in
> > both SPSR and CPSR set at the same time if a disable CPU 
interrupt
> > instruction is in the pipeline when the VIC interrupt is taken.
> > 
> > He correctly identifies the fact that the handler should not
> > use the state of the SPSR I bit to determine if it was invoked
> > at interrupt time.
> > 
> > So far so good.
> > 
> > He then shows how to force the VIC to generate a spurious 
interrupt,
> > and states:
> > 
> >    "To avoid generation of such spurious interrupts in a system,
> >     we must ensure no interrupt source exhibits transient 
behaviour,
> >     and we should only clear the software interrupt in the 
interrupt
> >     service routine."
> > 
> > OK. So you can write a handler that only clears the software
> > interrupt in the interrupt service routine, but you can't 
guarantee
> > that other interrupt sources don't have transient behavior.
> > 
> > He also states in the section on the AN10414 Solution that:
> > 
> >    "The implication here is that a surprise event generates only
> >     one interrupt, and that this is a spurious interrupt.  
However,
> >     our experiment shows that such a surprise event generates two
> >     successive interrupts,  a spurious interrupt followed by a
> >     regular external interrupt.
> > 
> > So, you don't lose the original interrupt, you just get a
> > spurious one to whatever the default vector is FIRST.
> > 
> > If I'm reading it correctly, Jaya's solution to spurious 
interrupts
> > is to disable ALL interrupts when handling ANY interrupt.
> > 
> > This is simply impractical in many applications.
> > 
> > Now, from Brendan's point of view, I think I hear him saying that
> > spurious interrupts are a fact of life in the VIC, and that you 
get
> > the correct one afterwards anyways.
> > 
> > To make things very simple, we just accept that a spurious 
interrupt
> > might happen, and deal with it as quickly as possible, then 
handle 
> the
> > real interrupt that is sure to follow.
> > 
> > I've been putting default handlers for unexpected sources for 
years.
> > 
> > During the debug phase of the project, they point to a handler 
that
> > logs the event and halts the system so I can figure out what
> > happened and analyse the impact on the system.
> > 
> > For production, we just log the event and return to normal 
> operation.
> > 
> > Brendan's solution of being aware of the problem and forcing
> > the default vector to a null handler is fine, from my point of 
view.
Show quoted textHide quoted text
> > 
> > If Jaya's customers don't like spurious interrupts, then they can
> > either use Jaya's solution, or switch chip architectures.
> > 
> > If Jaya's solution means the application does not meet real-time
> > commitments then his customers can either choose Brendan's
> > solution or switch chip architectures.
> > 
> > Jaya, I think Brendan is simply asking for proof one way or
> > another that having a null handler for the VIC default vector
> > is not going to work.
> > 
> > If you can provide solid proof with a reproducible example, then
> > do so. He's not asking you to do his failure analysis for free,
> > he's asking you to back up your statement that his solution is
> > wrong with more than just handwaving.
> > 
> > Brendan, I think Jaya believes that the only way to prevent
> > spurious interrupts is to disable interrupts at the processor
> > level when handling interrupts.
> > 
> > It works, it's just that you (and many others) think it's
> > impractical.
> > 
> > I think that we'll all have to agree to disagree on the "correct"
> > solution to the problem. Like many engineering tradeoffs, this
> > one must be balanced by each individual on its own merits.
> > 
> > Ralph Hempel - P.Eng.
> >
>

Re: spurious interrupts on LPC

2006-03-23 by philips_apps

Wow!  Great analysis Ralph!  THANK YOU, Robert

Excellent filter applied to get out the essence of so many messages. 


--- In lpc2000@yahoogroups.com, Ralph Hempel <rhempel@...> wrote:
>
> Honestly, this is getting ridiculous.
> 
> I actually read this thread just in case some nugget of
> information pops out :-)
> 
> I've been writing code for embedded systems for 20 years and
> have seen a lot of failures and issues with root causes in
> the interrupt handlers. I'll try to find common ground in
> both positions so we can give this dead horse a decent burial.
> 
> I've read Jaya's note on spurious IRQs at:
> 
> <http://www.cse.unsw.edu.au/~jayas/esdk/lpc2/spurious-irq.html>
> 
> In short, he describes how VIC interrupt handlers are supposed
> to work, and provides short, simple, bits of code that can be
> easily understood.
> 
> He then moves on to "surprise" interrupts, where he identifies
> the possibility that an interrupt handler may see the I bits in
> both SPSR and CPSR set at the same time if a disable CPU interrupt
> instruction is in the pipeline when the VIC interrupt is taken.
> 
> He correctly identifies the fact that the handler should not
> use the state of the SPSR I bit to determine if it was invoked
> at interrupt time.
> 
> So far so good.
> 
> He then shows how to force the VIC to generate a spurious 
interrupt,
> and states:
> 
>    "To avoid generation of such spurious interrupts in a system,
>     we must ensure no interrupt source exhibits transient 
behaviour,
>     and we should only clear the software interrupt in the 
interrupt
>     service routine."
> 
> OK. So you can write a handler that only clears the software
> interrupt in the interrupt service routine, but you can't guarantee
> that other interrupt sources don't have transient behavior.
> 
> He also states in the section on the AN10414 Solution that:
> 
>    "The implication here is that a surprise event generates only
>     one interrupt, and that this is a spurious interrupt.  However,
>     our experiment shows that such a surprise event generates two
>     successive interrupts,  a spurious interrupt followed by a
>     regular external interrupt.
> 
> So, you don't lose the original interrupt, you just get a
> spurious one to whatever the default vector is FIRST.
> 
> If I'm reading it correctly, Jaya's solution to spurious interrupts
> is to disable ALL interrupts when handling ANY interrupt.
> 
> This is simply impractical in many applications.
> 
> Now, from Brendan's point of view, I think I hear him saying that
> spurious interrupts are a fact of life in the VIC, and that you get
> the correct one afterwards anyways.
> 
> To make things very simple, we just accept that a spurious 
interrupt
> might happen, and deal with it as quickly as possible, then handle 
the
> real interrupt that is sure to follow.
> 
> I've been putting default handlers for unexpected sources for 
years.
> 
> During the debug phase of the project, they point to a handler that
> logs the event and halts the system so I can figure out what
> happened and analyse the impact on the system.
> 
> For production, we just log the event and return to normal 
operation.
> 
> Brendan's solution of being aware of the problem and forcing
> the default vector to a null handler is fine, from my point of 
view.
Show quoted textHide quoted text
> 
> If Jaya's customers don't like spurious interrupts, then they can
> either use Jaya's solution, or switch chip architectures.
> 
> If Jaya's solution means the application does not meet real-time
> commitments then his customers can either choose Brendan's
> solution or switch chip architectures.
> 
> Jaya, I think Brendan is simply asking for proof one way or
> another that having a null handler for the VIC default vector
> is not going to work.
> 
> If you can provide solid proof with a reproducible example, then
> do so. He's not asking you to do his failure analysis for free,
> he's asking you to back up your statement that his solution is
> wrong with more than just handwaving.
> 
> Brendan, I think Jaya believes that the only way to prevent
> spurious interrupts is to disable interrupts at the processor
> level when handling interrupts.
> 
> It works, it's just that you (and many others) think it's
> impractical.
> 
> I think that we'll all have to agree to disagree on the "correct"
> solution to the problem. Like many engineering tradeoffs, this
> one must be balanced by each individual on its own merits.
> 
> Ralph Hempel - P.Eng.
>

Re: spurious interrupts on LPC

2006-03-23 by Jayasooriah

Thanks Guille for raising a valid point.

1/  The certification requirement is not mine but that of a client.

2/  If your system can tolerate spurious interrupts *and*, you *may* still 
need to consider my findings because:

a)  PL190 clearly states the VIC does not handle interrupts that exhibit 
transient behaviour;

b)  the VIC on LPC family of processors is based on PL190 design; and

c)  advice from ARM (engineer working on PL192 design) is that my report 
may not cover everything that happens (or can happen) between the VIC and 
ARM in relation to various spurious interrupt scenarios.

For these reasons, irrespective of whether or not your system can tolerate 
spurious interrupts, I advocate prevention of spurious interrupts.

3/  The solution I proposed is applicable if you wish to prevent spurious 
interrupts:

a)  there are may OS'es that panic (and restart) when a spurious interrupt 
occurs;

b)  handling spurious interrupts in many kernels (eg Linux) is OPTIONAL; and

You should not be surprised to find that your favourite OS that runs on 
your favourite PC panics on receiving a spurious interrupt.

If Brendan's root question is along the same lines, then I trust this also 
answers his question.

Kind regards,

Jaya


>Message: 24
>    Date: Thu, 23 Mar 2006 14:21:59 -0000
>    From: "Guillermo Prandi" <yahoo.messenger@...>
>Subject: Re: spurious interrupts on LPC
>
>I'd like to point out that apparently (correct me if I'm wrong!) Jaya
>is radically against system that tolerate any interrupts whose source
>is unidentifiable. Apparently his products must pass some
>certification process that rejects this situation. Brendan's proposal
>is a solution to the problem "how to get a system running using UART
>interrupts", and what Jaya is proposing is a solution to the
>problem "how to get a system running so you never get an interrupt
>whose source you can't identify". It is clear that Brendan doesn't
>think that interrupts from unidentifiable sources are not that much
>of a problem. Hence the misunderstanding (unless I just added a new
>degree of misunderstanding; if that is case, my apologies).
>
>Guille

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

Re: spurious interrupts on LPC

2006-03-24 by Jayasooriah

Dear Ralph,

You started well but took a wrong turn.  This caused the flurry of noisy 
responses from the usual suspects.

Please refer to my reply by way of annotation (with noise deleted).

It would be nice if how could point out how you came that wrong conclusion 
(which I have clearly marked as "WRONG") so that I can fix it at the source.

Kind regards,

Jaya


>Message: 2
>    Date: Thu, 23 Mar 2006 10:06:20 -0500
>    From: Ralph Hempel <rhempel@...>
>Subject: Re: Re: spurious interrupts on LPC

...

>I've read Jaya's note on spurious IRQs at:
>
><http://www.cse.unsw.edu.au/~jayas/esdk/lpc2/spurious-irq.html>
>
>In short, he describes how VIC interrupt handlers are supposed
>to work, and provides short, simple, bits of code that can be
>easily understood.
>
>He then moves on to "surprise" interrupts, where he identifies
>the possibility that an interrupt handler may see the I bits in
>both SPSR and CPSR set at the same time if a disable CPU interrupt
>instruction is in the pipeline when the VIC interrupt is taken.
>
>He correctly identifies the fact that the handler should not
>use the state of the SPSR I bit to determine if it was invoked
>at interrupt time.
>
>So far so good.

Thank you.

>He then shows how to force the VIC to generate a spurious interrupt,
>and states:
>
>    "To avoid generation of such spurious interrupts in a system,
>     we must ensure no interrupt source exhibits transient behaviour,
>     and we should only clear the software interrupt in the interrupt
>     service routine."
>
>OK. So you can write a handler that only clears the software
>interrupt in the interrupt service routine, but you can't guarantee
>that other interrupt sources don't have transient behavior.

This is not my point.  I simply stated that you need to avoid interrupts in 
the system that exhibit transient behaviour to prevent this source of 
spurious interrupts.

>He also states in the section on the AN10414 Solution that:
>
>    "The implication here is that a surprise event generates only
>     one interrupt, and that this is a spurious interrupt.  However,
>     our experiment shows that such a surprise event generates two
>     successive interrupts,  a spurious interrupt followed by a
>     regular external interrupt.
>
>So, you don't lose the original interrupt, you just get a
>spurious one to whatever the default vector is FIRST.
>
>If I'm reading it correctly, Jaya's solution to spurious interrupts
>is to disable ALL interrupts when handling ANY interrupt.

WRONG.  Could you quote where in report I could have said anything that 
suggests this please -- so that I can correct it immediately.

This would be too expensive in any system.

>This is simply impractical in many applications.

It seems that you made an incorrect conclusion and then went off in a 
tangent, much to the bemusement of the usual suspects in this forum.

I need not consider the rest of your post that is based on a premise that 
is fundamentally flawed, because that was not the point I am making in my 
report at all.

>Now, from Brendan's point of view, I think I hear him saying that
>spurious interrupts are a fact of life in the VIC, and that you get
>the correct one afterwards anyways.

Brendans world is different to the deterministic world then.

>To make things very simple, we just accept that a spurious interrupt
>might happen, and deal with it as quickly as possible, then handle the
>real interrupt that is sure to follow.

Having alluded you to the dangers, it is your choice.

>I've been putting default handlers for unexpected sources for years.

I have been taking these out where programmers have put them for years.

>During the debug phase of the project, they point to a handler that
>logs the event and halts the system so I can figure out what
>happened and analyse the impact on the system.

And making this code benign in the field release is a popular misconception.

>For production, we just log the event and return to normal operation.

For high-rel systems, logging alone is not enough because it is an 
indication of problems to come in other parts of the system.

>Brendan's solution of being aware of the problem and forcing
>the default vector to a null handler is fine, from my point of view.

I would have said the same, if not for the fact that I was alluded to the 
fact that given the VIC "does not handle interrupts that exhibit transient 
behaviour", the behaviour of your system under these conditions is UNDEFINED.

>Jaya, I think Brendan is simply asking for proof one way or
>another that having a null handler for the VIC default vector
>is not going to work.

For proof, I would refer Brendant to PL190 design, and to speak to ARM 
engineers.  I have and I have made my conclusions based on the information 
I have been provided with.

>If you can provide solid proof with a reproducible example, then
>do so. He's not asking you to do his failure analysis for free,
>he's asking you to back up your statement that his solution is
>wrong with more than just handwaving.

I avoid spurious interrupts to save the expense of doing such an 
investigation because it works out cheaper.

Brendan can do this for his system with the very tools I have provided.

>Brendan, I think Jaya believes that the only way to prevent
>spurious interrupts is to disable interrupts at the processor
>level when handling interrupts.

WRONG.  Sorry for using UPPER CASE because this is what the usual suspects 
are rejoicing about, including Philips Apps.  This is not the solution that 
I recommended.

Again, if you can kindly point out how you came to this conclusion, please 
let me know so that I can correct my original report.

>I think that we'll all have to agree to disagree on the "correct"
>solution to the problem. Like many engineering tradeoffs, this
>one must be balanced by each individual on its own merits.

It is my observation (and that of many others working in this field) that 
many in the industry accept recovery solutions when they do not need to.

Your response to my report is an excellent example of how you can misread 
documentation and chose to live with it forever with band aids :)

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

Re: spurious interrupts on LPC

2006-03-24 by brendanmurphy37

Jaya,

I give up! I've now asked you on seven separate occasions for 
evidence to back your very specific claim that the solution I choose 
to take will not work. I'm forced to the conclusion that one of the 
following alternatives is true:

- you have some evidence, but are unwilling to share it (but why?)

- you don't believe you need evidence to back a claim (which is an 
odd position for an academic to take)

- you have no evidence (this is now my working assumption)

You characterise the solution I'm using as applying some kind of 
catch-all fix to hide behaviour that is unpredictable or poorly 
understood. I don't know of any professional engineer who works on 
this basis: I certainly would not pass for release any product that 
used arbitrary solutions to fix behaviour that wasn't fully 
characterised.

Your latest claim is that "
the behaviour of your system under these 
conditions is UNDEFINED". Based on all the available evidence, this 
is simply not true. Philips and ARM have between them have documented 
exactly what happens in exactly what circumstances.  ARM do not state 
that the VIC's behaviour is undefined. The system is not 
unpredictable or indeterminate: it always behaves the same way in 
response to the same inputs. Indeed, your own experiments have 
confirmed this documented behaviour. It calles the default interrupt 
handler in response to very specific events, which both Philips and 
you have documented.

With knowledge and understanding of this known, deterministic, 
behaviour a very simple work-around can be provided to avoid 
undesirable consequences of that behaviour. All the evidence 
(including your own!) is that such a solution is completely 
predictable, deterministic and fully characterised. 

Of course, both you and I know that I can't prove this last 
statement: there could be some set of inputs that make the system 
behave in some unpredicted or undefined way. It's very easy to prove 
the opposite though: all you have to do is provide some evidence of 
it failing to work as predicted. Unfortunately, you don't seem to 
have any such evidence. My conclusion is that until you or someone 
else can provide any, the solution I'm using is sound. 

I've no intension of asking you an eighth time to back your claim: 
I'm tired and have had enough.

Best wishes,

Brendan

--- In lpc2000@yahoogroups.com, Jayasooriah <jayasooriah@...> wrote:
>
> Dear Ralph,
> 
> You started well but took a wrong turn.  This caused the flurry of 
noisy 
> responses from the usual suspects.
> 
> Please refer to my reply by way of annotation (with noise deleted).
> 
> It would be nice if how could point out how you came that wrong 
conclusion 
> (which I have clearly marked as "WRONG") so that I can fix it at 
the source.
Show quoted textHide quoted text
> 
> Kind regards,
> 
> Jaya
> 
>

Re: spurious interrupts on LPC

2006-03-24 by Jayasooriah

Dear Brendan,

I am amazed that you would believe I have not answered your question on six 
separate occasions and yet repeat the very same question again.

You must have been getting something or you will not be asking the same 
question over and over again so many times.

Let me try another angle.

Try explaining what "The VIC does not handle interrupts that exhibit 
transient behaviour" (direct quote from PL190 TRM) means.

The TRM does say is that when an interrupt exhibits transient behaviour, 
"the priority logic of VIC is not set".  What does "not set" means?

Set to 0?  1?  ... 15? 16?

Is the state of the priority logic defined after such an event?

Who defines the behaviour of the VIC when it is subject to interrupts that 
exhibit transient behaviour?

Can I define it based on the result of my experiments?  Can you?

I am happy to rephrase what I said thus: "I am not able to define what 
happens in your system when you do the things you said you are doing" if 
this will put an end to this saga.

One more thing.  My questions above are for you to silently answer in your 
own mind, in a hope that this would help you understand.  It is not my 
intention for you to respond to my post and answer these questions.

A very tired-of-Brendan Jaya

--- In lpc2000@yahoogroups.com, "brendanmurphy37" <brendan.murphy@...> wrote:
 >
 >
 > Jaya,
 >
 > I give up! I've now asked you on seven separate occasions for
 > evidence to back your very specific claim that the solution I choose
 > to take will not work. I'm forced to the conclusion that one of the
 > following alternatives is true:
 >
 > - you have some evidence, but are unwilling to share it (but why?)
 >
 > - you don't believe you need evidence to back a claim (which is an
 > odd position for an academic to take)
 >
 > - you have no evidence (this is now my working assumption)
 >
 > You characterise the solution I'm using as applying some kind of
 > catch-all fix to hide behaviour that is unpredictable or poorly
 > understood. I don't know of any professional engineer who works on
 > this basis: I certainly would not pass for release any product that
 > used arbitrary solutions to fix behaviour that wasn't fully
 > characterised.
 >
 > Your latest claim is that "Â…the behaviour of your system under these
 > conditions is UNDEFINED". Based on all the available evidence, this
 > is simply not true. Philips and ARM have between them have documented
 > exactly what happens in exactly what circumstances.  ARM do not state
 > that the VIC's behaviour is undefined. The system is not
 > unpredictable or indeterminate: it always behaves the same way in
 > response to the same inputs. Indeed, your own experiments have
 > confirmed this documented behaviour. It calles the default interrupt
 > handler in response to very specific events, which both Philips and
 > you have documented.
 >
 > With knowledge and understanding of this known, deterministic,
 > behaviour a very simple work-around can be provided to avoid
 > undesirable consequences of that behaviour. All the evidence
 > (including your own!) is that such a solution is completely
 > predictable, deterministic and fully characterised.
 >
 > Of course, both you and I know that I can't prove this last
 > statement: there could be some set of inputs that make the system
 > behave in some unpredicted or undefined way. It's very easy to prove
 > the opposite though: all you have to do is provide some evidence of
 > it failing to work as predicted. Unfortunately, you don't seem to
 > have any such evidence. My conclusion is that until you or someone
 > else can provide any, the solution I'm using is sound.
 >
 > I've no intension of asking you an eighth time to back your claim:
 > I'm tired and have had enough.
 >
 > Best wishes,
 >
 > Brendan

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

Re: spurious interrupts on LPC

2006-03-24 by ian.scanlon

Brendan,

I think it is only fair to let Jayasooriah save face on this one, 
maybe let it go.

Ian Scanlon


--- In lpc2000@yahoogroups.com, Jayasooriah <jayasooriah@...> wrote:
>
> Dear Brendan,
> 
> I am amazed that you would believe I have not answered your 
question on six 
> separate occasions and yet repeat the very same question again.
> 
> You must have been getting something or you will not be asking the 
same 
> question over and over again so many times.
> 
> Let me try another angle.
> 
> Try explaining what "The VIC does not handle interrupts that 
exhibit 
> transient behaviour" (direct quote from PL190 TRM) means.
> 
> The TRM does say is that when an interrupt exhibits transient 
behaviour, 
> "the priority logic of VIC is not set".  What does "not set" means?
> 
> Set to 0?  1?  ... 15? 16?
> 
> Is the state of the priority logic defined after such an event?
> 
> Who defines the behaviour of the VIC when it is subject to 
interrupts that 
> exhibit transient behaviour?
> 
> Can I define it based on the result of my experiments?  Can you?
> 
> I am happy to rephrase what I said thus: "I am not able to define 
what 
> happens in your system when you do the things you said you are 
doing" if 
> this will put an end to this saga.
> 
> One more thing.  My questions above are for you to silently answer 
in your 
> own mind, in a hope that this would help you understand.  It is not 
my 
> intention for you to respond to my post and answer these questions.
> 
> A very tired-of-Brendan Jaya
> 
> --- In lpc2000@yahoogroups.com, "brendanmurphy37" <brendan.murphy@> 
wrote:
>  >
>  >
>  > Jaya,
>  >
>  > I give up! I've now asked you on seven separate occasions for
>  > evidence to back your very specific claim that the solution I 
choose
>  > to take will not work. I'm forced to the conclusion that one of 
the
>  > following alternatives is true:
>  >
>  > - you have some evidence, but are unwilling to share it (but 
why?)
>  >
>  > - you don't believe you need evidence to back a claim (which is 
an
>  > odd position for an academic to take)
>  >
>  > - you have no evidence (this is now my working assumption)
>  >
>  > You characterise the solution I'm using as applying some kind of
>  > catch-all fix to hide behaviour that is unpredictable or poorly
>  > understood. I don't know of any professional engineer who works 
on
>  > this basis: I certainly would not pass for release any product 
that
>  > used arbitrary solutions to fix behaviour that wasn't fully
>  > characterised.
>  >
>  > Your latest claim is that "Â…the behaviour of your system under 
these
>  > conditions is UNDEFINED". Based on all the available evidence, 
this
>  > is simply not true. Philips and ARM have between them have 
documented
>  > exactly what happens in exactly what circumstances.  ARM do not 
state
>  > that the VIC's behaviour is undefined. The system is not
>  > unpredictable or indeterminate: it always behaves the same way in
>  > response to the same inputs. Indeed, your own experiments have
>  > confirmed this documented behaviour. It calles the default 
interrupt
>  > handler in response to very specific events, which both Philips 
and
>  > you have documented.
>  >
>  > With knowledge and understanding of this known, deterministic,
>  > behaviour a very simple work-around can be provided to avoid
>  > undesirable consequences of that behaviour. All the evidence
>  > (including your own!) is that such a solution is completely
>  > predictable, deterministic and fully characterised.
>  >
>  > Of course, both you and I know that I can't prove this last
>  > statement: there could be some set of inputs that make the system
>  > behave in some unpredicted or undefined way. It's very easy to 
prove
>  > the opposite though: all you have to do is provide some evidence 
of
>  > it failing to work as predicted. Unfortunately, you don't seem to
>  > have any such evidence. My conclusion is that until you or 
someone
>  > else can provide any, the solution I'm using is sound.
>  >
>  > I've no intension of asking you an eighth time to back your 
claim:
>  > I'm tired and have had enough.
>  >
>  > Best wishes,
>  >
>  > Brendan
> 
> Send instant messages to your online friends 
http://au.messenger.yahoo.com
>

Re: spurious interrupts on LPC

2006-03-24 by brendanmurphy37

Jaya,

Thanks for your concern, but my mind is perfectly clear.

At the risk of tiring you further, see my answers to your questions 
below.

--- In lpc2000@yahoogroups.com, Jayasooriah <jayasooriah@...> wrote:

> Try explaining what "The VIC does not handle interrupts that 
exhibit 
> transient behaviour" (direct quote from PL190 TRM) means.
> 

I guess it means what it says: it doesn't handle them. What it 
doesn't say is that the behaviour of the VIC is in any way undefined 
or unpredictable when they happen. It mightn't be the behaviour you 
want, but it is predictable and deterministic (unless you or ARM have 
evidence to the contrary, that is).

> The TRM does say is that when an interrupt exhibits transient 
behaviour, 
> "the priority logic of VIC is not set".  What does "not set" means?
> 
> Set to 0?  1?  ... 15? 16?

It doesn't matter what the priority is set to, as the solution 
doesn't make use of the priority in any way. 

> 
> Is the state of the priority logic defined after such an event?
> 

I'm sure it is, and that ARM and Philips know what it will be. The 
fact they have chosen not to document it doesn't mean it's undefined: 
simply that you shouldn't assume anything about it. That's OK though, 
as the solution I'm using doesn't.

> Who defines the behaviour of the VIC when it is subject to 
interrupts that 
> exhibit transient behaviour?

It's behaviour is governed by its internal design. Philips have 
documented how it behaves when the relevant conditions arise. The 
solution I use makes use of this information, together with all the 
other information available from both Philips and ARM.

> 
> Can I define it based on the result of my experiments?  Can you?
> 

Experiments can't define how it behaves (which is determined by its 
design), thay can only confirm that it behaves the way it does. My 
system and your experiments both confirm the behaviour as documented 
by Philips.

> I am happy to rephrase what I said thus: "I am not able to define 
what 
> happens in your system when you do the things you said you are 
doing" if 
> this will put an end to this saga.

I'm not asking you to define how it behaves, only to back an 
assertion you continue to make that the solution won't work.

All the evidence is that the system is entirely predictable and 
deterministic. Given there's no evidence to the contrary, my 
conclusion is that the solution is sound.

> 
> One more thing.  My questions above are for you to silently answer 
in your 
> own mind, in a hope that this would help you understand.  It is not 
my 
> intention for you to respond to my post and answer these questions.
> 

I've no problem in understanding what the issue is: my reason for 
answering is to help you understand.

> A very tired-of-Brendan Jaya
> 

Looks like we're both tired!

Best wishes
Brendan

Re: spurious interrupts on LPC

2006-03-24 by Jayasooriah

--- In lpc2000@yahoogroups.com, "brendanmurphy37" <brendan.murphy@...> wrote:
 > > The TRM does say is that when an interrupt exhibits transient
 > behaviour,
 > > "the priority logic of VIC is not set".  What does "not set" means?
 > >
 > > Set to 0?  1?  ... 15? 16?
 >
 > It doesn't matter what the priority is set to, as the solution
 > doesn't make use of the priority in any way.

I and like minded people who rely in interrupt service handler getting it 
right each and every time do think it matters.

It is this UNDEFINED priority that is acknowledged by the read and write to 
VICVECTADDR in your blindly acknowledging all spurious interrupts.

If you are happy with serving an interrupt the second time around, or 
random preemption of one interrupt with another (totally defeating priority 
levels) then go ahead an ignore these events.

Jaya

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

Re: spurious interrupts on LPC

2006-03-24 by Jayasooriah

Hah! I wonder who is saving face here.  Did you not also jump on Ralph 
Hempel bandwagon.  Remember, the flawed one?

It just goes on to show that it does not matter what how many years one 
claims to have worked in the area.  There are always those with vested 
interest who will blindly follow suit and do not recognise it when this 
blows up in their faces.

Good work Ian Scanlon.  Keep it up!

Jaya

--- In lpc2000@yahoogroups.com, "ian.scanlon" <scanlon.design@...> wrote:
 >
 > Brendan,
 >
 > I think it is only fair to let Jayasooriah save face on this one,
 > maybe let it go.
 >
 > Ian Scanlon

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

Re: spurious interrupts on LPC

2006-03-24 by ian.scanlon

That doesn't make any sense.  

Think, THEN type.


--- In lpc2000@yahoogroups.com, Jayasooriah <jayasooriah@...> wrote:
>
> Hah! I wonder who is saving face here.  Did you not also jump on 
Ralph 
> Hempel bandwagon.  Remember, the flawed one?
> 
> It just goes on to show that it does not matter what how many years 
one 
> claims to have worked in the area.  There are always those with 
vested 
> interest who will blindly follow suit and do not recognise it when 
this 
> blows up in their faces.
> 
> Good work Ian Scanlon.  Keep it up!
> 
> Jaya
> 
> --- In lpc2000@yahoogroups.com, "ian.scanlon" <scanlon.design@> 
wrote:
>  >
>  > Brendan,
>  >
>  > I think it is only fair to let Jayasooriah save face on this one,
>  > maybe let it go.
>  >
>  > Ian Scanlon
> 
> Send instant messages to your online friends 
http://au.messenger.yahoo.com
>

Re: spurious interrupts on LPC

2006-03-25 by Jayasooriah

Hello,

For what it is worth, here is a summary of the issues surrounding the very 
first question I raised relating to spurious interrupts on LPC 2000 family.

A different perspective emerges you look at the distractions by way of 
noise generated those whom I have labelled "the usual suspects".


==> 2006-03-14 21:40:10 GMT Jayasooriah

I looked at LPC200 FAQ claim that spurious interrupts can occur in any ARM7 
that incorporates the VIC.  I was surprised and I asked Robert (Philips) to 
clarify:

1/  Is the spurious interrupt problem specific to implementation of VIC on 
LPC, or is it a generic VIC problem?

2/  Do any other ARM cores with VIC suffer from the same problem?

[Has anyone answered this question?  No?  Yes ... no!]

==> 2006-03-15 00:12:07 GMT Robert (Philips)

Forwarded my question the author of the FAQ.

[Neither Robert nor Philips has provided any response from the author to date.]

Asks me to investigate this on other ARM variants and report my findings.

2006-03-15 07:06:37 GMT Jayasooriah

I respond by saying that none of the other variants make this claim.

I reiterate that I am looking for references to substantiate the claim in 
Philips LPC200 FAQ and Applicaition Note 10414 that all ARM7 variants with 
VIC suffer from spurious interrupts that LPC suffers from.

[To date, there has been no reference from Philips, Robert or anyone else 
for that matter to substantiate this claim.]

I did lookup references to spurious interrupts in relation to ARM7 and most 
of them come back to LPC2000.  There was even a reference to LPC2000 in 
relation to spurious on lecture notes in a University course!  It does look 
like the LPC family is very well known for its spurious interrupts like no 
other processor.

I will admit I found few references relating to peripheral on particular 
ARM variants, but these appear to be peripheral specific -- there has been 
no other claim I can find that attributes the issue as generic to any ARM7 
+ VIC.

We did not get an answer to the question, but we did have a very active 
thread with lots of distractions from the usual suspects:

Distraction #1:  ARM FAQ 3677 explains spurious interrupts in ARM7.

At first there was rejoicing amongst the usual suspects at how quickly my 
question was dealt given it looked I was challenge the legitimacy of a 
claim by Philips.

When we got to the bottom of this and learnt of the subtle difference 
between spurious and surprise interrupts, and that this FAQ discusses 
surprise interrupts, not spurious interrupts, the usual suspects went quiet 
for a while ...

Then someone who claimed to have many years experience in this field made a 
bungle and claimed that my solution does not allow nested interrupts.

Distraction #2:  My solution is not acceptable because it does not allow 
nested interrupts.

There was another round of rejoicing from the usual suspects, that my 
solution is not accepted to anyone in the real world.

I pointed out the bungle.   Things went quiet for while.

There was this one person who persisted on having his implementation 
validated by by me through this forum.  This led to a further incorrect 
claim relating to my solution.

Distraction #3:  My solution in relation to UARTs is not a solution because 
one cannot use the UART if one do not enable receiver interrupts.

I pointed out that how one uses timer interrupts to receive characters as 
the UARTs have a FIFO in the receive channel, and that this method has been 
put to practice and shown to work.

The same persistent person then picks up another issue in relation to 
validating his solution, regarding my statement that what happens in the 
case of what this person was doing is undefined.

Distraction #4:  Prove the VIC behaviour is "UNDEFINED" if one polls 
interrupt sources one by one in the "spurious interrupt handler".

I point out that I cannot define the behaviour because the PL190 TRM 
clearly states this something it was not designed to handle, and that if 
such an event did occur, its priority logic cannot cope with it.

I did say that came to this view having discussed the matter with ARM, and 
having read responses from engineer in ARM working on PL192 design.

[PL192 is the successor to PL190 and it can handle interrupts RDA/CTI type 
of interrupts from UART0/1 on LPC family.]

I pointed out that reading and writing to the VIC vector when you do not 
know the cause of the interrupt is documented in PL190 as unpredictable.

Now there was another rejoice ... but exactly for what reason I am not 
sure.  It  appears to do with someone claiming of having run tests for a 
long time and not having had a single spurious interrupt over this time.

After all the distractions it does not seem to matter that not one person 
has been able to provide one shred of evidence, or even a reference to 
substantiate the claim by Philps that started this thread.

We now know for a fact, from ARM, that any ARM variant that incorporates 
PL192 VIC will not support interrupts of the type originating form UART0/1 
on LPC family.

It does not seem to matter that, because the LPC's world spins around the 
PL190 design as implemented on LPCs, and has problems with its UART0/1 that 
generates spurious interrupts.

Now lets turn to the solutions I proposed that is based on *preventing* 
spurious interrupts altogether on the LPC.  This has been formally 
documented and available on-line for anyone to comment on.

As far as AN10414 is concerned, there are two scenarios that generate 
spurious interrupts on LPC: a) when an interrupt are disabled through VIC 
as it occurs; and b) when CTI and RDA interact within the UARTs in 
transient manner that any PL190 based VIC does not support.

In relation the first problem:

* My solution to Philips AN10414 watchdog problem is downright simple: use 
CPSR instead of VIC that Philips recommends.  It is not a matter of 
preference as one poster put it, but a matter of either preventing or 
handling spurious interrupts.

* I also showed how one can disable a particular interrupt using the VIC if 
one brackets this operation using masking operations on CPSR.

One asks why the above solution is unacceptable to the usual suspects.  It 
appears that if this solution were acceptable, then they would have to 
admit that RDA/CTI is not relating to ARM7+VIC ...

Given the UART RDA and CTI interrupts exhibit transient behaviour that is 
not handled by the VIC, it is easy for me to say "do not use these 
interrupts". Of course Philips cannot say the same without admitting to a 
flaw in the UART0/1 design.

There were claims that my solution meant one cannot use UARTS at all -- but 
hang on, I did show how one can use the UARTs but without using RDA/CTI 
interrupts.  This appears to have been buried in the noise generated by the 
usual suspects.

Someone said to me a while ago, when one participant was continually 
pestering me for answers, that I should have simply told this person to 
point out where it says the behaviour of VIC is defined when an interrupt 
exhibits transient behaviour.

I thought it would be kinder for me to keep explaining in different ways 
until this person eventually catches on to how my solution removes spurious 
interrupts altogether nice and simple.

Guess what?  I think my explanation worked if I am to read the many emails 
I have had arising from opening up my analysis and conclusions on-line for 
comment.  Even this persistent poster appears to have understood it somewhat!

Judging from the fact that my critics in this forum have yet been unable to 
fault my findings or solutions, we actually ended up solving the problem in 
the best way possible -- without generation of a single spurious interrupt 
in the system.

I am encouraged by the responses I got to my analysis of LPC spurious 
interrupts and calls for the same level of documentation for the other 
problems I found.

Have a browse through this thread on GMANE and you will see what role 
Philips has been playing in this forum, in this thread in particular.

I was told that that Philips is here for no other reason that to promote 
its LPC family of products.  I said to the effect that is is not a bad 
thing.  But I was reminded there is a complimentary role to play that 
involves gagging threads that dwell in (potentially serious) flaws in LPC 
family.

The issues I have raised certainly appear to dwell in flaws to a large 
extent, and there is no doubt in my mind that Robert (of Philips) is doing 
what he is expected to do under the circumstances.

It is a pity the usual suspects see virtue in gagging independent and 
unaligned discussion of the problems raised here relating to various 
aspects of the LPC, be it code security, watchdog anomalies, flash 
deficiencies or spurious interrupts.

Enjoy.

Jaya

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

Re: [lpc2000] Re: spurious interrupts on LPC

2006-03-25 by George M. Gallant, Jr.

Jayasooriah,

Congratulations. You are the first person I have ever created a filter
to automatically route
all email from directly to the trash bin! I won't even get your
everlasting nonsensical replies!!!!

George

On Sun, 2006-03-26 at 00:03 +1100, Jayasooriah wrote:

> Hello,
> 
> For what it is worth, here is a summary of the issues surrounding the
> very 
> first question I raised relating to spurious interrupts on LPC 2000
> family.
> 
> A different perspective emerges you look at the distractions by way
> of 
> noise generated those whom I have labelled "the usual suspects".
> 
> 
> ==> 2006-03-14 21:40:10 GMT Jayasooriah
> 
> I looked at LPC200 FAQ claim that spurious interrupts can occur in any
> ARM7 
> that incorporates the VIC.  I was surprised and I asked Robert
> (Philips) to 
> clarify:
> 
> 1/  Is the spurious interrupt problem specific to implementation of
> VIC on 
> LPC, or is it a generic VIC problem?
> 
> 2/  Do any other ARM cores with VIC suffer from the same problem?
> 
> [Has anyone answered this question?  No?  Yes ... no!]
> 
> ==> 2006-03-15 00:12:07 GMT Robert (Philips)
> 
> Forwarded my question the author of the FAQ.
> 
> [Neither Robert nor Philips has provided any response from the author
> to date.]
> 
> Asks me to investigate this on other ARM variants and report my
> findings.
> 
> 2006-03-15 07:06:37 GMT Jayasooriah
> 
> I respond by saying that none of the other variants make this claim.
> 
> I reiterate that I am looking for references to substantiate the claim
> in 
> Philips LPC200 FAQ and Applicaition Note 10414 that all ARM7 variants
> with 
> VIC suffer from spurious interrupts that LPC suffers from.
> 
> [To date, there has been no reference from Philips, Robert or anyone
> else 
> for that matter to substantiate this claim.]
> 
> I did lookup references to spurious interrupts in relation to ARM7 and
> most 
> of them come back to LPC2000.  There was even a reference to LPC2000
> in 
> relation to spurious on lecture notes in a University course!  It does
> look 
> like the LPC family is very well known for its spurious interrupts
> like no 
> other processor.
> 
> I will admit I found few references relating to peripheral on
> particular 
> ARM variants, but these appear to be peripheral specific -- there has
> been 
> no other claim I can find that attributes the issue as generic to any
> ARM7 
> + VIC.
> 
> We did not get an answer to the question, but we did have a very
> active 
> thread with lots of distractions from the usual suspects:
> 
> Distraction #1:  ARM FAQ 3677 explains spurious interrupts in ARM7.
> 
> At first there was rejoicing amongst the usual suspects at how quickly
> my 
> question was dealt given it looked I was challenge the legitimacy of
> a 
> claim by Philips.
> 
> When we got to the bottom of this and learnt of the subtle difference 
> between spurious and surprise interrupts, and that this FAQ discusses 
> surprise interrupts, not spurious interrupts, the usual suspects went
> quiet 
> for a while ...
> 
> Then someone who claimed to have many years experience in this field
> made a 
> bungle and claimed that my solution does not allow nested interrupts.
> 
> Distraction #2:  My solution is not acceptable because it does not
> allow 
> nested interrupts.
> 
> There was another round of rejoicing from the usual suspects, that my 
> solution is not accepted to anyone in the real world.
> 
> I pointed out the bungle.   Things went quiet for while.
> 
> There was this one person who persisted on having his implementation 
> validated by by me through this forum.  This led to a further
> incorrect 
> claim relating to my solution.
> 
> Distraction #3:  My solution in relation to UARTs is not a solution
> because 
> one cannot use the UART if one do not enable receiver interrupts.
> 
> I pointed out that how one uses timer interrupts to receive characters
> as 
> the UARTs have a FIFO in the receive channel, and that this method has
> been 
> put to practice and shown to work.
> 
> The same persistent person then picks up another issue in relation to 
> validating his solution, regarding my statement that what happens in
> the 
> case of what this person was doing is undefined.
> 
> Distraction #4:  Prove the VIC behaviour is "UNDEFINED" if one polls 
> interrupt sources one by one in the "spurious interrupt handler".
> 
> I point out that I cannot define the behaviour because the PL190 TRM 
> clearly states this something it was not designed to handle, and that
> if 
> such an event did occur, its priority logic cannot cope with it.
> 
> I did say that came to this view having discussed the matter with ARM,
> and 
> having read responses from engineer in ARM working on PL192 design.
> 
> [PL192 is the successor to PL190 and it can handle interrupts RDA/CTI
> type 
> of interrupts from UART0/1 on LPC family.]
> 
> I pointed out that reading and writing to the VIC vector when you do
> not 
> know the cause of the interrupt is documented in PL190 as
> unpredictable.
> 
> Now there was another rejoice ... but exactly for what reason I am
> not 
> sure.  It  appears to do with someone claiming of having run tests for
> a 
> long time and not having had a single spurious interrupt over this
> time.
> 
> After all the distractions it does not seem to matter that not one
> person 
> has been able to provide one shred of evidence, or even a reference
> to 
> substantiate the claim by Philps that started this thread.
> 
> We now know for a fact, from ARM, that any ARM variant that
> incorporates 
> PL192 VIC will not support interrupts of the type originating form
> UART0/1 
> on LPC family.
> 
> It does not seem to matter that, because the LPC's world spins around
> the 
> PL190 design as implemented on LPCs, and has problems with its UART0/1
> that 
> generates spurious interrupts.
> 
> Now lets turn to the solutions I proposed that is based on
> *preventing* 
> spurious interrupts altogether on the LPC.  This has been formally 
> documented and available on-line for anyone to comment on.
> 
> As far as AN10414 is concerned, there are two scenarios that generate 
> spurious interrupts on LPC: a) when an interrupt are disabled through
> VIC 
> as it occurs; and b) when CTI and RDA interact within the UARTs in 
> transient manner that any PL190 based VIC does not support.
> 
> In relation the first problem:
> 
> * My solution to Philips AN10414 watchdog problem is downright simple:
> use 
> CPSR instead of VIC that Philips recommends.  It is not a matter of 
> preference as one poster put it, but a matter of either preventing or 
> handling spurious interrupts.
> 
> * I also showed how one can disable a particular interrupt using the
> VIC if 
> one brackets this operation using masking operations on CPSR.
> 
> One asks why the above solution is unacceptable to the usual suspects.
> It 
> appears that if this solution were acceptable, then they would have
> to 
> admit that RDA/CTI is not relating to ARM7+VIC ...
> 
> Given the UART RDA and CTI interrupts exhibit transient behaviour that
> is 
> not handled by the VIC, it is easy for me to say "do not use these 
> interrupts". Of course Philips cannot say the same without admitting
> to a 
> flaw in the UART0/1 design.
> 
> There were claims that my solution meant one cannot use UARTS at all
> -- but 
> hang on, I did show how one can use the UARTs but without using
> RDA/CTI 
> interrupts.  This appears to have been buried in the noise generated
> by the 
> usual suspects.
> 
> Someone said to me a while ago, when one participant was continually 
> pestering me for answers, that I should have simply told this person
> to 
> point out where it says the behaviour of VIC is defined when an
> interrupt 
> exhibits transient behaviour.
> 
> I thought it would be kinder for me to keep explaining in different
> ways 
> until this person eventually catches on to how my solution removes
> spurious 
> interrupts altogether nice and simple.
> 
> Guess what?  I think my explanation worked if I am to read the many
> emails 
> I have had arising from opening up my analysis and conclusions on-line
> for 
> comment.  Even this persistent poster appears to have understood it
> somewhat!
> 
> Judging from the fact that my critics in this forum have yet been
> unable to 
> fault my findings or solutions, we actually ended up solving the
> problem in 
> the best way possible -- without generation of a single spurious
> interrupt 
> in the system.
> 
> I am encouraged by the responses I got to my analysis of LPC spurious 
> interrupts and calls for the same level of documentation for the
> other 
> problems I found.
> 
> Have a browse through this thread on GMANE and you will see what role 
> Philips has been playing in this forum, in this thread in particular.
> 
> I was told that that Philips is here for no other reason that to
> promote 
> its LPC family of products.  I said to the effect that is is not a
> bad 
> thing.  But I was reminded there is a complimentary role to play that 
> involves gagging threads that dwell in (potentially serious) flaws in
> LPC 
> family.
> 
> The issues I have raised certainly appear to dwell in flaws to a
> large 
> extent, and there is no doubt in my mind that Robert (of Philips) is
> doing 
> what he is expected to do under the circumstances.
> 
> It is a pity the usual suspects see virtue in gagging independent and 
> unaligned discussion of the problems raised here relating to various 
> aspects of the LPC, be it code security, watchdog anomalies, flash 
> deficiencies or spurious interrupts.
> 
> Enjoy.
> 
> Jaya
> 
> Send instant messages to your online friends
> http://au.messenger.yahoo.com 
> 
> 
> 
> ______________________________________________________________________
> YAHOO! GROUPS LINKS
> 
> 
>      1.  Visit your group "lpc2000" on the web.
>           
>      2.  To unsubscribe from this group, send an email to:
>          lpc2000-unsubscribe@yahoogroups.com
>           
>      3.  Your use of Yahoo! Groups is subject to the Yahoo! Terms of
>         Service.
> 
> 
> 
> ______________________________________________________________________
> 
> 


[Non-text portions of this message have been removed]

Re: [lpc2000] Re: spurious interrupts on LPC

2006-03-25 by Michael Rubitschka

Hi George

<<<
>Congratulations. You are the first person I have ever created a filter
>to automatically route
>all email from directly to the trash bin!
>>>

This process is called plonk!
It is used in newsgroups to tell a troll,
that his threads are now directed to the trashcan.
It is an acronym for
please leave our newsgroup, kid
or describes the sound when his threads hit your trashcan.

Cheers
Michael
Show quoted textHide quoted text
>From: "George M. Gallant, Jr." <ggallant571@...>
>Reply-To: lpc2000@yahoogroups.com
>To: lpc2000@yahoogroups.com
>Subject: Re: [lpc2000] Re: spurious interrupts on LPC
>Date: Sat, 25 Mar 2006 09:43:22 -0500
>
>Jayasooriah,
>
>Congratulations. You are the first person I have ever created a filter
>to automatically route
>all email from directly to the trash bin! I won't even get your
>everlasting nonsensical replies!!!!
>
>George
>
>On Sun, 2006-03-26 at 00:03 +1100, Jayasooriah wrote:
>
> > Hello,
> >
> > For what it is worth, here is a summary of the issues surrounding the
> > very
> > first question I raised relating to spurious interrupts on LPC 2000
> > family.
> >
> > A different perspective emerges you look at the distractions by way
> > of
> > noise generated those whom I have labelled "the usual suspects".
> >
> >
> > ==> 2006-03-14 21:40:10 GMT Jayasooriah
> >
> > I looked at LPC200 FAQ claim that spurious interrupts can occur in any
> > ARM7
> > that incorporates the VIC.  I was surprised and I asked Robert
> > (Philips) to
> > clarify:
> >
> > 1/  Is the spurious interrupt problem specific to implementation of
> > VIC on
> > LPC, or is it a generic VIC problem?
> >
> > 2/  Do any other ARM cores with VIC suffer from the same problem?
> >
> > [Has anyone answered this question?  No?  Yes ... no!]
> >
> > ==> 2006-03-15 00:12:07 GMT Robert (Philips)
> >
> > Forwarded my question the author of the FAQ.
> >
> > [Neither Robert nor Philips has provided any response from the author
> > to date.]
> >
> > Asks me to investigate this on other ARM variants and report my
> > findings.
> >
> > 2006-03-15 07:06:37 GMT Jayasooriah
> >
> > I respond by saying that none of the other variants make this claim.
> >
> > I reiterate that I am looking for references to substantiate the claim
> > in
> > Philips LPC200 FAQ and Applicaition Note 10414 that all ARM7 variants
> > with
> > VIC suffer from spurious interrupts that LPC suffers from.
> >
> > [To date, there has been no reference from Philips, Robert or anyone
> > else
> > for that matter to substantiate this claim.]
> >
> > I did lookup references to spurious interrupts in relation to ARM7 and
> > most
> > of them come back to LPC2000.  There was even a reference to LPC2000
> > in
> > relation to spurious on lecture notes in a University course!  It does
> > look
> > like the LPC family is very well known for its spurious interrupts
> > like no
> > other processor.
> >
> > I will admit I found few references relating to peripheral on
> > particular
> > ARM variants, but these appear to be peripheral specific -- there has
> > been
> > no other claim I can find that attributes the issue as generic to any
> > ARM7
> > + VIC.
> >
> > We did not get an answer to the question, but we did have a very
> > active
> > thread with lots of distractions from the usual suspects:
> >
> > Distraction #1:  ARM FAQ 3677 explains spurious interrupts in ARM7.
> >
> > At first there was rejoicing amongst the usual suspects at how quickly
> > my
> > question was dealt given it looked I was challenge the legitimacy of
> > a
> > claim by Philips.
> >
> > When we got to the bottom of this and learnt of the subtle difference
> > between spurious and surprise interrupts, and that this FAQ discusses
> > surprise interrupts, not spurious interrupts, the usual suspects went
> > quiet
> > for a while ...
> >
> > Then someone who claimed to have many years experience in this field
> > made a
> > bungle and claimed that my solution does not allow nested interrupts.
> >
> > Distraction #2:  My solution is not acceptable because it does not
> > allow
> > nested interrupts.
> >
> > There was another round of rejoicing from the usual suspects, that my
> > solution is not accepted to anyone in the real world.
> >
> > I pointed out the bungle.   Things went quiet for while.
> >
> > There was this one person who persisted on having his implementation
> > validated by by me through this forum.  This led to a further
> > incorrect
> > claim relating to my solution.
> >
> > Distraction #3:  My solution in relation to UARTs is not a solution
> > because
> > one cannot use the UART if one do not enable receiver interrupts.
> >
> > I pointed out that how one uses timer interrupts to receive characters
> > as
> > the UARTs have a FIFO in the receive channel, and that this method has
> > been
> > put to practice and shown to work.
> >
> > The same persistent person then picks up another issue in relation to
> > validating his solution, regarding my statement that what happens in
> > the
> > case of what this person was doing is undefined.
> >
> > Distraction #4:  Prove the VIC behaviour is "UNDEFINED" if one polls
> > interrupt sources one by one in the "spurious interrupt handler".
> >
> > I point out that I cannot define the behaviour because the PL190 TRM
> > clearly states this something it was not designed to handle, and that
> > if
> > such an event did occur, its priority logic cannot cope with it.
> >
> > I did say that came to this view having discussed the matter with ARM,
> > and
> > having read responses from engineer in ARM working on PL192 design.
> >
> > [PL192 is the successor to PL190 and it can handle interrupts RDA/CTI
> > type
> > of interrupts from UART0/1 on LPC family.]
> >
> > I pointed out that reading and writing to the VIC vector when you do
> > not
> > know the cause of the interrupt is documented in PL190 as
> > unpredictable.
> >
> > Now there was another rejoice ... but exactly for what reason I am
> > not
> > sure.  It  appears to do with someone claiming of having run tests for
> > a
> > long time and not having had a single spurious interrupt over this
> > time.
> >
> > After all the distractions it does not seem to matter that not one
> > person
> > has been able to provide one shred of evidence, or even a reference
> > to
> > substantiate the claim by Philps that started this thread.
> >
> > We now know for a fact, from ARM, that any ARM variant that
> > incorporates
> > PL192 VIC will not support interrupts of the type originating form
> > UART0/1
> > on LPC family.
> >
> > It does not seem to matter that, because the LPC's world spins around
> > the
> > PL190 design as implemented on LPCs, and has problems with its UART0/1
> > that
> > generates spurious interrupts.
> >
> > Now lets turn to the solutions I proposed that is based on
> > *preventing*
> > spurious interrupts altogether on the LPC.  This has been formally
> > documented and available on-line for anyone to comment on.
> >
> > As far as AN10414 is concerned, there are two scenarios that generate
> > spurious interrupts on LPC: a) when an interrupt are disabled through
> > VIC
> > as it occurs; and b) when CTI and RDA interact within the UARTs in
> > transient manner that any PL190 based VIC does not support.
> >
> > In relation the first problem:
> >
> > * My solution to Philips AN10414 watchdog problem is downright simple:
> > use
> > CPSR instead of VIC that Philips recommends.  It is not a matter of
> > preference as one poster put it, but a matter of either preventing or
> > handling spurious interrupts.
> >
> > * I also showed how one can disable a particular interrupt using the
> > VIC if
> > one brackets this operation using masking operations on CPSR.
> >
> > One asks why the above solution is unacceptable to the usual suspects.
> > It
> > appears that if this solution were acceptable, then they would have
> > to
> > admit that RDA/CTI is not relating to ARM7+VIC ...
> >
> > Given the UART RDA and CTI interrupts exhibit transient behaviour that
> > is
> > not handled by the VIC, it is easy for me to say "do not use these
> > interrupts". Of course Philips cannot say the same without admitting
> > to a
> > flaw in the UART0/1 design.
> >
> > There were claims that my solution meant one cannot use UARTS at all
> > -- but
> > hang on, I did show how one can use the UARTs but without using
> > RDA/CTI
> > interrupts.  This appears to have been buried in the noise generated
> > by the
> > usual suspects.
> >
> > Someone said to me a while ago, when one participant was continually
> > pestering me for answers, that I should have simply told this person
> > to
> > point out where it says the behaviour of VIC is defined when an
> > interrupt
> > exhibits transient behaviour.
> >
> > I thought it would be kinder for me to keep explaining in different
> > ways
> > until this person eventually catches on to how my solution removes
> > spurious
> > interrupts altogether nice and simple.
> >
> > Guess what?  I think my explanation worked if I am to read the many
> > emails
> > I have had arising from opening up my analysis and conclusions on-line
> > for
> > comment.  Even this persistent poster appears to have understood it
> > somewhat!
> >
> > Judging from the fact that my critics in this forum have yet been
> > unable to
> > fault my findings or solutions, we actually ended up solving the
> > problem in
> > the best way possible -- without generation of a single spurious
> > interrupt
> > in the system.
> >
> > I am encouraged by the responses I got to my analysis of LPC spurious
> > interrupts and calls for the same level of documentation for the
> > other
> > problems I found.
> >
> > Have a browse through this thread on GMANE and you will see what role
> > Philips has been playing in this forum, in this thread in particular.
> >
> > I was told that that Philips is here for no other reason that to
> > promote
> > its LPC family of products.  I said to the effect that is is not a
> > bad
> > thing.  But I was reminded there is a complimentary role to play that
> > involves gagging threads that dwell in (potentially serious) flaws in
> > LPC
> > family.
> >
> > The issues I have raised certainly appear to dwell in flaws to a
> > large
> > extent, and there is no doubt in my mind that Robert (of Philips) is
> > doing
> > what he is expected to do under the circumstances.
> >
> > It is a pity the usual suspects see virtue in gagging independent and
> > unaligned discussion of the problems raised here relating to various
> > aspects of the LPC, be it code security, watchdog anomalies, flash
> > deficiencies or spurious interrupts.
> >
> > Enjoy.
> >
> > Jaya
> >
> > Send instant messages to your online friends
> > http://au.messenger.yahoo.com
> >
> >
> >
> > ______________________________________________________________________
> > YAHOO! GROUPS LINKS
> >
> >
> >      1.  Visit your group "lpc2000" on the web.
> >
> >      2.  To unsubscribe from this group, send an email to:
> >          lpc2000-unsubscribe@yahoogroups.com
> >
> >      3.  Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> >         Service.
> >
> >
> >
> > ______________________________________________________________________
> >
> >
>
>
>[Non-text portions of this message have been removed]
>

Re: [lpc2000] Re: spurious interrupts on LPC

2006-03-25 by balaji cr

I am planning to do the same. It is really sad that
this forum occasionally generates SPAM. 

Balaji

--- "George M. Gallant, Jr." <ggallant571@...>
wrote:

> Jayasooriah,
> 
> Congratulations. You are the first person I have
> ever created a filter
> to automatically route
> all email from directly to the trash bin! I won't
> even get your
> everlasting nonsensical replies!!!!
> 
> George
> 
> On Sun, 2006-03-26 at 00:03 +1100, Jayasooriah
> wrote:
> 
> > Hello,
> > 
> > For what it is worth, here is a summary of the
> issues surrounding the
> > very 
> > first question I raised relating to spurious
> interrupts on LPC 2000
> > family.
> > 
> > A different perspective emerges you look at the
> distractions by way
> > of 
> > noise generated those whom I have labelled "the
> usual suspects".
> > 
> > 
> > ==> 2006-03-14 21:40:10 GMT Jayasooriah
> > 
> > I looked at LPC200 FAQ claim that spurious
> interrupts can occur in any
> > ARM7 
> > that incorporates the VIC.  I was surprised and I
> asked Robert
> > (Philips) to 
> > clarify:
> > 
> > 1/  Is the spurious interrupt problem specific to
> implementation of
> > VIC on 
> > LPC, or is it a generic VIC problem?
> > 
> > 2/  Do any other ARM cores with VIC suffer from
> the same problem?
> > 
> > [Has anyone answered this question?  No?  Yes ...
> no!]
> > 
> > ==> 2006-03-15 00:12:07 GMT Robert (Philips)
> > 
> > Forwarded my question the author of the FAQ.
> > 
> > [Neither Robert nor Philips has provided any
> response from the author
> > to date.]
> > 
> > Asks me to investigate this on other ARM variants
> and report my
> > findings.
> > 
> > 2006-03-15 07:06:37 GMT Jayasooriah
> > 
> > I respond by saying that none of the other
> variants make this claim.
> > 
> > I reiterate that I am looking for references to
> substantiate the claim
> > in 
> > Philips LPC200 FAQ and Applicaition Note 10414
> that all ARM7 variants
> > with 
> > VIC suffer from spurious interrupts that LPC
> suffers from.
> > 
> > [To date, there has been no reference from
> Philips, Robert or anyone
> > else 
> > for that matter to substantiate this claim.]
> > 
> > I did lookup references to spurious interrupts in
> relation to ARM7 and
> > most 
> > of them come back to LPC2000.  There was even a
> reference to LPC2000
> > in 
> > relation to spurious on lecture notes in a
> University course!  It does
> > look 
> > like the LPC family is very well known for its
> spurious interrupts
> > like no 
> > other processor.
> > 
> > I will admit I found few references relating to
> peripheral on
> > particular 
> > ARM variants, but these appear to be peripheral
> specific -- there has
> > been 
> > no other claim I can find that attributes the
> issue as generic to any
> > ARM7 
> > + VIC.
> > 
> > We did not get an answer to the question, but we
> did have a very
> > active 
> > thread with lots of distractions from the usual
> suspects:
> > 
> > Distraction #1:  ARM FAQ 3677 explains spurious
> interrupts in ARM7.
> > 
> > At first there was rejoicing amongst the usual
> suspects at how quickly
> > my 
> > question was dealt given it looked I was challenge
> the legitimacy of
> > a 
> > claim by Philips.
> > 
> > When we got to the bottom of this and learnt of
> the subtle difference 
> > between spurious and surprise interrupts, and that
> this FAQ discusses 
> > surprise interrupts, not spurious interrupts, the
> usual suspects went
> > quiet 
> > for a while ...
> > 
> > Then someone who claimed to have many years
> experience in this field
> > made a 
> > bungle and claimed that my solution does not allow
> nested interrupts.
> > 
> > Distraction #2:  My solution is not acceptable
> because it does not
> > allow 
> > nested interrupts.
> > 
> > There was another round of rejoicing from the
> usual suspects, that my 
> > solution is not accepted to anyone in the real
> world.
> > 
> > I pointed out the bungle.   Things went quiet for
> while.
> > 
> > There was this one person who persisted on having
> his implementation 
> > validated by by me through this forum.  This led
> to a further
> > incorrect 
> > claim relating to my solution.
> > 
> > Distraction #3:  My solution in relation to UARTs
> is not a solution
> > because 
> > one cannot use the UART if one do not enable
> receiver interrupts.
> > 
> > I pointed out that how one uses timer interrupts
> to receive characters
> > as 
> > the UARTs have a FIFO in the receive channel, and
> that this method has
> > been 
> > put to practice and shown to work.
> > 
> > The same persistent person then picks up another
> issue in relation to 
> > validating his solution, regarding my statement
> that what happens in
> > the 
> > case of what this person was doing is undefined.
> > 
> > Distraction #4:  Prove the VIC behaviour is
> "UNDEFINED" if one polls 
> > interrupt sources one by one in the "spurious
> interrupt handler".
> > 
> > I point out that I cannot define the behaviour
> because the PL190 TRM 
> > clearly states this something it was not designed
> to handle, and that
> > if 
> > such an event did occur, its priority logic cannot
> cope with it.
> > 
> > I did say that came to this view having discussed
> the matter with ARM,
> > and 
> > having read responses from engineer in ARM working
> on PL192 design.
> > 
> > [PL192 is the successor to PL190 and it can handle
> interrupts RDA/CTI
> 
=== message truncated ===

Dream is just a dream.  A goal is a dream with a plan and a deadline.
- Harvey Mackay

Re: spurious interrupts on LPC

2006-03-26 by brendanmurphy37

Jaya,

Who cares?

Brendan

P.S. It's no wonder you're tired: that's a lot of typing you've done 
there! Maybe you should rest a while....


--- In lpc2000@yahoogroups.com, Jayasooriah <jayasooriah@...> wrote:
>
> Hello,
> 
> For what it is worth, here is a summary of the issues surrounding 
the very 
> first question I raised relating to spurious interrupts on LPC 
2000 family.
> 
> A different perspective emerges you look at the distractions by 
way of 
> noise generated those whom I have labelled "the usual suspects".
> 
> 
> ==> 2006-03-14 21:40:10 GMT Jayasooriah
> 
> I looked at LPC200 FAQ claim that spurious interrupts can occur in 
any ARM7 
> that incorporates the VIC.  I was surprised and I asked Robert 
(Philips) to 
> clarify:
> 
> 1/  Is the spurious interrupt problem specific to implementation 
of VIC on 
> LPC, or is it a generic VIC problem?
> 
> 2/  Do any other ARM cores with VIC suffer from the same problem?
> 
> [Has anyone answered this question?  No?  Yes ... no!]
> 
> ==> 2006-03-15 00:12:07 GMT Robert (Philips)
> 
> Forwarded my question the author of the FAQ.
> 
> [Neither Robert nor Philips has provided any response from the 
author to date.]
> 
> Asks me to investigate this on other ARM variants and report my 
findings.
> 
> 2006-03-15 07:06:37 GMT Jayasooriah
> 
> I respond by saying that none of the other variants make this 
claim.
> 
> I reiterate that I am looking for references to substantiate the 
claim in 
> Philips LPC200 FAQ and Applicaition Note 10414 that all ARM7 
variants with 
> VIC suffer from spurious interrupts that LPC suffers from.
> 
> [To date, there has been no reference from Philips, Robert or 
anyone else 
> for that matter to substantiate this claim.]
> 
> I did lookup references to spurious interrupts in relation to ARM7 
and most 
> of them come back to LPC2000.  There was even a reference to 
LPC2000 in 
> relation to spurious on lecture notes in a University course!  It 
does look 
> like the LPC family is very well known for its spurious interrupts 
like no 
> other processor.
> 
> I will admit I found few references relating to peripheral on 
particular 
> ARM variants, but these appear to be peripheral specific -- there 
has been 
> no other claim I can find that attributes the issue as generic to 
any ARM7 
> + VIC.
> 
> We did not get an answer to the question, but we did have a very 
active 
> thread with lots of distractions from the usual suspects:
> 
> Distraction #1:  ARM FAQ 3677 explains spurious interrupts in ARM7.
> 
> At first there was rejoicing amongst the usual suspects at how 
quickly my 
> question was dealt given it looked I was challenge the legitimacy 
of a 
> claim by Philips.
> 
> When we got to the bottom of this and learnt of the subtle 
difference 
> between spurious and surprise interrupts, and that this FAQ 
discusses 
> surprise interrupts, not spurious interrupts, the usual suspects 
went quiet 
> for a while ...
> 
> Then someone who claimed to have many years experience in this 
field made a 
> bungle and claimed that my solution does not allow nested 
interrupts.
> 
> Distraction #2:  My solution is not acceptable because it does not 
allow 
> nested interrupts.
> 
> There was another round of rejoicing from the usual suspects, that 
my 
> solution is not accepted to anyone in the real world.
> 
> I pointed out the bungle.   Things went quiet for while.
> 
> There was this one person who persisted on having his 
implementation 
> validated by by me through this forum.  This led to a further 
incorrect 
> claim relating to my solution.
> 
> Distraction #3:  My solution in relation to UARTs is not a 
solution because 
> one cannot use the UART if one do not enable receiver interrupts.
> 
> I pointed out that how one uses timer interrupts to receive 
characters as 
> the UARTs have a FIFO in the receive channel, and that this method 
has been 
> put to practice and shown to work.
> 
> The same persistent person then picks up another issue in relation 
to 
> validating his solution, regarding my statement that what happens 
in the 
> case of what this person was doing is undefined.
> 
> Distraction #4:  Prove the VIC behaviour is "UNDEFINED" if one 
polls 
> interrupt sources one by one in the "spurious interrupt handler".
> 
> I point out that I cannot define the behaviour because the PL190 
TRM 
> clearly states this something it was not designed to handle, and 
that if 
> such an event did occur, its priority logic cannot cope with it.
> 
> I did say that came to this view having discussed the matter with 
ARM, and 
> having read responses from engineer in ARM working on PL192 design.
> 
> [PL192 is the successor to PL190 and it can handle interrupts 
RDA/CTI type 
> of interrupts from UART0/1 on LPC family.]
> 
> I pointed out that reading and writing to the VIC vector when you 
do not 
> know the cause of the interrupt is documented in PL190 as 
unpredictable.
> 
> Now there was another rejoice ... but exactly for what reason I am 
not 
> sure.  It  appears to do with someone claiming of having run tests 
for a 
> long time and not having had a single spurious interrupt over this 
time.
> 
> After all the distractions it does not seem to matter that not one 
person 
> has been able to provide one shred of evidence, or even a 
reference to 
> substantiate the claim by Philps that started this thread.
> 
> We now know for a fact, from ARM, that any ARM variant that 
incorporates 
> PL192 VIC will not support interrupts of the type originating form 
UART0/1 
> on LPC family.
> 
> It does not seem to matter that, because the LPC's world spins 
around the 
> PL190 design as implemented on LPCs, and has problems with its 
UART0/1 that 
> generates spurious interrupts.
> 
> Now lets turn to the solutions I proposed that is based on 
*preventing* 
> spurious interrupts altogether on the LPC.  This has been formally 
> documented and available on-line for anyone to comment on.
> 
> As far as AN10414 is concerned, there are two scenarios that 
generate 
> spurious interrupts on LPC: a) when an interrupt are disabled 
through VIC 
> as it occurs; and b) when CTI and RDA interact within the UARTs in 
> transient manner that any PL190 based VIC does not support.
> 
> In relation the first problem:
> 
> * My solution to Philips AN10414 watchdog problem is downright 
simple: use 
> CPSR instead of VIC that Philips recommends.  It is not a matter 
of 
> preference as one poster put it, but a matter of either preventing 
or 
> handling spurious interrupts.
> 
> * I also showed how one can disable a particular interrupt using 
the VIC if 
> one brackets this operation using masking operations on CPSR.
> 
> One asks why the above solution is unacceptable to the usual 
suspects.  It 
> appears that if this solution were acceptable, then they would 
have to 
> admit that RDA/CTI is not relating to ARM7+VIC ...
> 
> Given the UART RDA and CTI interrupts exhibit transient behaviour 
that is 
> not handled by the VIC, it is easy for me to say "do not use these 
> interrupts". Of course Philips cannot say the same without 
admitting to a 
> flaw in the UART0/1 design.
> 
> There were claims that my solution meant one cannot use UARTS at 
all -- but 
> hang on, I did show how one can use the UARTs but without using 
RDA/CTI 
> interrupts.  This appears to have been buried in the noise 
generated by the 
> usual suspects.
> 
> Someone said to me a while ago, when one participant was 
continually 
> pestering me for answers, that I should have simply told this 
person to 
> point out where it says the behaviour of VIC is defined when an 
interrupt 
> exhibits transient behaviour.
> 
> I thought it would be kinder for me to keep explaining in 
different ways 
> until this person eventually catches on to how my solution removes 
spurious 
> interrupts altogether nice and simple.
> 
> Guess what?  I think my explanation worked if I am to read the 
many emails 
> I have had arising from opening up my analysis and conclusions on-
line for 
> comment.  Even this persistent poster appears to have understood 
it somewhat!
> 
> Judging from the fact that my critics in this forum have yet been 
unable to 
> fault my findings or solutions, we actually ended up solving the 
problem in 
> the best way possible -- without generation of a single spurious 
interrupt 
> in the system.
> 
> I am encouraged by the responses I got to my analysis of LPC 
spurious 
> interrupts and calls for the same level of documentation for the 
other 
> problems I found.
> 
> Have a browse through this thread on GMANE and you will see what 
role 
> Philips has been playing in this forum, in this thread in 
particular.
> 
> I was told that that Philips is here for no other reason that to 
promote 
> its LPC family of products.  I said to the effect that is is not a 
bad 
> thing.  But I was reminded there is a complimentary role to play 
that 
> involves gagging threads that dwell in (potentially serious) flaws 
in LPC 
> family.
> 
> The issues I have raised certainly appear to dwell in flaws to a 
large 
> extent, and there is no doubt in my mind that Robert (of Philips) 
is doing 
> what he is expected to do under the circumstances.
> 
> It is a pity the usual suspects see virtue in gagging independent 
and 
> unaligned discussion of the problems raised here relating to 
various 
> aspects of the LPC, be it code security, watchdog anomalies, flash 
> deficiencies or spurious interrupts.
> 
> Enjoy.
> 
> Jaya
> 
> Send instant messages to your online friends 
http://au.messenger.yahoo.com
>

Re: spurious interrupts on LPC

2006-03-26 by Jayasooriah

Hi Brendan,

With due respect the responses I got from those who read this forum 
silently suggests otherwise.

You could use mail filters if you feel offended by my analyses.

Feel free to ignore my posts and enjoy.

Kind regards,

Jaya
--- In lpc2000@yahoogroups.com, "brendanmurphy37" <brendan.murphy@...> wrote:
 >
 >
 > Jaya,
 >
 > Who cares?
 >
 > Brendan
 >
 > P.S. It's no wonder you're tired: that's a lot of typing you've done
 > there! Maybe you should rest a while....

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

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.