It sounds like you have a lot working correctly and the design sounds basically correct. Are you trying to nest interrupts? It is safest to not re-arm interrupts until exiting the ISR. This defeats some of the advantage of the VIC - but keeps the software simple. If you do allow nested interrupts, you need to push all registers - not just R0-R7. You say that you end up in the startup code from time to time. Does the system continue to run? Some designs may purposely re-use the startup code? Or are you hanging in one of the exception handlers and looping there? As for the value written to the VIC, any value can be written. The data is "don't care" - the act of writing clears the interrupt to the VIC. You might want to also look at the section on Spurious Interrupts in the LPC/VIC documentation. The problem occurs with peripherals that have multiple source encoded into one word. These are cleared with non-atomic read/modify/write sequences. It is possible that a new interrupt will post after the read. When written back, the interrupt will be cleared and missed forever. This is discussed in the errata sheet for LPC21xx. _____ From: lpc2000@yahoogroups.com [mailto:lpc2000@yahoogroups.com] On Behalf Of sengoontoh Sent: Wednesday, August 03, 2005 6:30 AM To: lpc2000@yahoogroups.com Subject: [lpc2000] Interrupts run but main program halts I've a program running interrupts on both UART0 and UART1 as well as a Match timer interrupt. All interrupts are routed through the VIC with Timer0 having slot 0, uart0 and uart1 having slot 1 and 2 respectively. When my application starts getting busy with lots of activity on uart 1 and uart 0, it hangs. The interrupts continue to work flawlessly. You can even trace through them in IAR. However every single time I break, I'm in an interrupt handler. Occasionally I'm in the low level program startup code. Does anyone have any idea what would cause this behavior. Also I had a question about resetting the Vic. I'm doing VicVectorAddres s = 0. I've seen people setting it to 0xff. Which one is correct? Thanks! _____ 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/> . _____ [Non-text portions of this message have been removed]
Message
RE: [lpc2000] Interrupts run but main program halts
2005-08-03 by Dan Beadle
Attachments
- No local attachments were found for this message.