how to utilize interrupts in arm9 processors..? what is residing inside ISR..?
Hi,
There are lots of people happy to help but I think we need a bit more information! Can I first check that you mean ARM9 processors and not Cortex-A9? ARM9 is quite an elderly product these days so if you could be more specific that would help!
Also, what are you interested in knowing? Perhaps if you could provide answers to some of these questions, we can work out how best to help.
Do you want to know how to write an ISR? In C or assembler? Do you need it to be re-entrant? Do you have an interrupt controller in the system? Are you using an OS or writing bare metal code?
Look forward to hearing from you.
Chris
I am talking about ARM9 not cortex core...and i want to know how can we write ISR in c compilers...?
Thanks for clarifying.
I recommend that you start by reading a couple of sections in the ARM Software Development Tools documentation. While these refer specifically to ARM tools, the core behaviour which they describe is not tools-specific. Try:
- Section 10.11 "__irq" in the Compiler User Guide, and
- Section 5.12 "__Re-entrant Interrupt Handling" in the ARM Compiler Software Development Guide
You can find both of these documents on our documentation site at infocenter.arm.com. Looks under "ARM Software Development Tools" in the section on "ARM Compiler Toolchain".
You say that you are interested in writing interrupt handlers using the C compiler. You should note that, with the ARM compiler at least, it is only possible to write a simple, non re-entrant interrupt handler in C. To handle re-entrant (or nested) interrupts, you need to write some assembler too. This is explained in the sections I referenced above.
Hope this helps.
thank for ur suggestions.
ISR is a simple routine as normal function. There is a keyword in the SW development guide as chris specified to place it accordingly into the ISR handler address in vector table.
Thanks for your reply.
Just to be clear, the __irq keyword will indeed cause the compiler to output object code which can be installed as an IRQ handler (it will modify the rules for saving/restoring registers and change the return address, for instance) but it will not install the function in the vector table. You still need to do that yourself...