STM32 interrupts and programming with GCC

Probably one of the key features in any microcontroller is interrupt system. ARM Cortex-M3 microcontrollers may have up to 256 interrupts sources. First 15 interrupt sources are called system exceptions. These exceptions rise within Cortex core like reset, NMI, hard fault and error, debug and SystTick timer interrupt. In the exception table, they start from address 0x00000004 and are numbered from 1 to 15. There is no 0 number exception (FYI – the very top of exception table address is used to store the starting point of stack pointer): Each exception vector holds the four-byte address of service routine that is called when an exception occurs. Exception table usually is located in startup code like this: Continue reading