Iam working IMX6 Q and processor is ARM cortex A9, Iam at beginning stage can please anyone tell me how to write interrupt handler in a code for ARM cortex A9
As a first pass, I would refer you to the Cortex-A Programmer's Guide, notably Ch 12, which discusses interrupt handling. The document is also useful for general learning.
If you have Arm Development Studio or DS-5, there are some generic Cortex-A9 examples included. The "fireworks_A9-FVP_AC6" examples include code to set up the interrupt controller and handle timer interrupts.