Hi folks, I'm struggling to understand how to handle interrupts for the 2294. I can see that when I get an interrupt, the processor jumps off to the following line of code in the startup assembly file: ldr pc, [pc, #irq_handler_address - . - 8] This then jumps off to the following line of code: irq_handler: b irq_handler There is a comment that these are defined as weak variables and can be redefined in user code. So, at the moment, it's quite easy to see that when there's an interrupt the program just gets stuck on this line of code. It seems obvious that I then have to redirect this code to the appropriate interrupt handler. I would have thought that I need to read the VICVectAddr which should contain the address of one of the registers VICVectAddr0 to VICVectAddr15. I assume that the program would jump to that VICVectAddrX register and then from there to the user code which has been written to deal with the interrupt. What I'm not clear about is how to replace this line of code: irq_handler: b irq_handler To something like: irq_handler: b (VICVectAddr) In other words, when I get to the line of code irq_handler: Then jump to the location pointed to be the contents of VICVectAddr. I assume that if I can set that up, the compiler will sorted out jumping to wherever VICVectAddrX points to. Am I basically correct in my assumptions, or way off line?! Many thanks, Rob
Message
Interrupt Handline
2004-11-07 by Robert Wood
Attachments
- No local attachments were found for this message.