In Cortex-M3, there are 255 interrupt vectors, and it’s relocateable. During the initial boot, the interrupt vector table are located at 0×00, but, then, if you want to, you can move it to somewhere else.
The first ten interrupts are fixed by ARM (means you will always find them eventhough you’re using NXP, Atmel, STMicro, Luminary Micro, etc). The rest is up to the silicon vendors implementation.
The interrupt handler is a bit different from any other MCUs. You just need to write the interrupt handler address, without any additional code (such as: B <interrupt_handler_addr> to jump to specific address). Also, the first thing on your interrupt table is the stack address. The Cortex-M3 interrupt controller (NVIC) will need stack address before it can jump to the handler. Hence, it’s put as the first thing on the interrupt table.
Here’s how to implement it (more…)