Thanks, Richard. So, if I understand correctly, if I don't clear the interrupts in my interrupt handler (or a new interrupt happens while at the handler) the handler will be called again as soon as I restore the CSPR register, which should happen at my final MOVS PC,LR? I'm worried about inadvertently writing code that would miss interrupts. As I get from your explanation, that's easy to avoid. Guille --- In lpc2000@yahoogroups.com, Richard Duits <yahoo@r...> wrote: > > With everything that generates an interrupt, you have to clear the > interrupt by reading or writing to a register. For example with the UART > you clear a data ready interrupt by reading the data. If you cannot > clear the interrupt (for example a UART transmit holding register emty > while you have nothing to send), you disable it. If you do not clear or > disable the interrupt, the interrupt will be called again immidiately > after you return from it. > > Level sensitive interrupts are active if the input pin is low (high if > INTPOLAR bit is set), edge sensitive interrupts become active on the > high to low transition (if INTPOLAR bit is clear) of the input pin. All > internal interrupts are level sensitive. External interrupts are cached > and converted to level senstive interrupt by the external interrupt > controller. > > > > Guillermo Prandi wrote: > > > Hi! I read every doc I've found and I couldn't get a detailed > > description of the interrupt mechanism in the LPC2XXX. In particular, > > I'm looking for the following: > > > > - What happens to interrupts while they're disabled? Do they > > get "cached"? I mean, if I'm in the middle of processing a UART0 > > interrupt and UART1 receives a new character, I'd probably have the > > interrupts disabled. Will I miss the interrupt? > > > > - Provided the interrupts get chached while disabled somehow... That > > would mean that they will trigger as soon as they're enabled, isn't it? > > I plan to keep interrupts disabled while processing other interrupts; > > could that work? > > > > - What's the exact difference between edge and level triggered > > interrupts? > > > > Thanks in advance > > > > > > > > > > > > SPONSORED LINKS > > Microprocessor > > <http://groups.yahoo.com/gads? t=ms&k=Microprocessor&w1=Microprocessor&w2=Microcontrollers&w3=Pic+mic rocontrollers&w4=8051+microprocessor&c=4&s=93&.sig=tsVC- J9hJ5qyXg0WPR0l6g> > > Microcontrollers > > <http://groups.yahoo.com/gads? t=ms&k=Microcontrollers&w1=Microprocessor&w2=Microcontrollers&w3=Pic+m icrocontrollers&w4=8051+microprocessor&c=4&s=93&.sig=DvJVNqC_pqRTm8Xq0 1nxwg> > > Pic microcontrollers > > <http://groups.yahoo.com/gads? t=ms&k=Pic+microcontrollers&w1=Microprocessor&w2=Microcontrollers&w3=P ic+microcontrollers&w4=8051+microprocessor&c=4&s=93&.sig=TpkoX4KofDJ7c 6LyBvUqVQ> > > > > 8051 microprocessor > > <http://groups.yahoo.com/gads? t=ms&k=8051+microprocessor&w1=Microprocessor&w2=Microcontrollers&w3=Pi c+microcontrollers&w4=8051+microprocessor&c=4&s=93&.sig=1Ipf1Fjfbd_HVI lekkDP-A> > > > > > > > > ------------------------------------------------------------------ ------ > > 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/>. > > > > > > ------------------------------------------------------------------ ------ > > >
Message
Re: How do interrupts work?
2005-10-16 by Guillermo Prandi
Attachments
- No local attachments were found for this message.