Assertion duration of edge interrupts can decrease spurious interrupts ..?
1.If i have a compulsion to use egde triggering peripheral on MIPS CP0,
would it be useful if i can increase the assertion duration of edge
interupts (this I can do) ..I mean to say probablity of loosing edge interrupts will decrasse.
2.does CP0 interrupt logic samples interrupts after each instruction or at some multiplication(..or division.?) of system clock.
Regards,
Ashish
Quoted 34 lines · On Mon, 17 Nov 2003 Ralf Baechle wrote :
Quoted 3 lines · ashish anand
I have a generic question regarding interrupt controler functionality integrated in CP0 on mips architecture.
I don't see any interface to configure the edge/level triggering settings.MIPS only supports level triggered interrupts in coprocessor 0.
Quoted 2 lines
though in our BSP we take care of handling spurious interrupts , but is this designed to be like that..?
There is no handling needed. If the processor takes an interrupt but none of the interrupt bits in
c0_statusis set, just return. That's a legal condition.Quoted 4 lines
I mean to ask , suppose I want to add a edge triggering peripheral. to the extent of my understanding this will certainly generate the spurious interrupts when coupled with a level triggering configuration in CP0 (by default..?).
You can directly sample the level of the edge irq in the interrupt bits in the cause register. But that seems a fragile approach.
Quoted 5 lines
if i am handling through
CP0_CAUSEor any other register inspection that can work but I am loosing so many valid interupts which would have been really valid with edge trigger pin of interrupt controller . further this type of handling is valid for actual spurious interrupts not for those who are certain to be fired because of edge/level mismatching.If you really need to use an edge triggered interrupt on a MIPS then you probably want to use some circuit interrupt controller that converts the edge to a level triggered interrupt.
Ralf
Quoted 4 lines · ashish anand
1.If i have a compulsion to use egde triggering peripheral on MIPS CP0, would it be useful if i can increase the assertion duration of edge interupts (this I can do) ..I mean to say probablity of loosing edge interrupts will decrasse.
That would help but still not be a safe mechanism. Not only the processor may be missing the edge - Linux may also disable interrupts for quite a long time. You'd have to use a hard realtime variant of Linux or you will loose interrupts ...
Quoted 2 lines
2.does CP0 interrupt logic samples interrupts after each instruction or at some multiplication(..or division.?) of system clock.
This is a very processor specific detail. R4000 for example will sample interrupts on pipe stage 3; something along that lines is probably done in most in-order processors.
Ralf