---- Original Message ---- From: "Sagaert Johan" <sagaert.j@...> To: <lpc2000@yahoogroups.com> Sent: Wednesday, March 15, 2006 10:17 AM Subject: [lpc2000] Vectored versus FIQ when using multiple interrupts > As i understand from the docs : > > When i need interupt routines for 3 peripherals : > > If i use vectored ISR's each peripheral will have its own isr where i > clear the irq request bits (if needed to do manually) > With vectored ISRs i can decide the priority by assigning the slot > number. Yes, but those priorities only matter if your interrupt entry/exit code re-enables IRQs, allowing nested interrupts. GCC's default IRQ entry/exit code doesn't -- to get it, you must write it in assembler. I don't know about Keil and IAR. Such entry/exit code adds some overhead. Philips has an application note about it: http://www.standardics.philips.com/support/documents/microcontrollers/pdf/an10381.pdf > If i use FIQ i will only need one ISR that contains code to check > wich one of the \ufffdperipherals did cause the interrupt. > My decision logic to test IRQ bits will decide on the priority. > The same way of dealing with the request bits when using the non > vectored way.(but has some more cpu overhead in restoring > registers ). Again, FIQs don't nest unless you write code to re-enable them in your handler. During the processing a low-priority, slow interrupt, you can of course poll for higher-priority ones. > Did i interprete this correct ? > > What happens if multiple IRQ's are set and i only handle and clear > one in the FIQ routine ? The FIQ handler will be re-entered immediately upon return. > Will there still be gain in terms of latency between FIQ with > multiple IRQ's and Vectored ISR's ? Probably. If you can limit yourself to two priority levels, the easiest way, and with the least overhead, is to have the high-priority interrupt(s) FIQ and the low-priority interrupt(s) IRQ. An FIQ can interrupt an IRQ but not the other way (if you set the IRQ and FIQ disable bits right for normal, IRQ and FIQ mode). Karl Olsen
Message
Re: [lpc2000] Vectored versus FIQ when using multiple interrupts
2006-03-15 by Karl Olsen
Attachments
- No local attachments were found for this message.