With Cortex-M3, interrupt service routines does not need special ''return from interrupt'' instruction. Exception/Interrupt return is triggered if the return instruction put a special value (called EXC_RETURN) to the program counter. This special value is written to LR(R14) by hardware automatically as the processor enter the exception/interrupt handler. As a result, interrupt/exception handlers can be written as normal C functions.
Take a look at stm32f10x_vector.c file and this file is compiler dependent.
Inside this file you can find out the interrupt vector table for a Cortex M3 where all interrupts functions are defined. I hope this will help you to understand.
I have ride 7, and with it a load of examples came.
I have successfully tried my own example with EXTI1_IRQHandler. To get it to work, one has to call EXTI_init, set EXTI1_IRQChannel with NVIC_Init. Since I got it to work, I am happy. However, I would like to understand how the compliler knows that EXTI1_IRQHandler is the interupt routine. I have looked all over and that handler is only defined in stm32f10x_it.c and stm32f10x_it.h. How does this routine get called, and how does the complier know it has to end with a return from interupt?
On 28-01-2008 at 18:27, Anonymous wrote: Take a look at stm32f10x_vector.c file and this file is compiler dependent. Inside this file you can find out the interrupt vector table for a Cortex M3 where all interrupts functions are defined. I hope this will help you to understand. Thanks, only on the Ride 7 system this file is renamed to crt0_STM32x.c, however in the header comments of this file the file says its name is stm32f10x_vector.c.