2017-08-30 02:16 AM
Hello community,
Iwould like to configure Timer 2 of my STM32F103C8 to use it as a simple overflow interrupt service and Iwould like to do this in assembly language.
On page 198 of the reference manual i found this address of the TIM2 global interrupt:0x0000_00B0
But how can I define a section in my code which lies on that address?
For example something like this (pseudo code):
.section 0x000000B0
rjmp myTimer2OverflowHandler�?�?
#stm32 #interrupt
2017-08-30 08:14 AM
Please review some books and manuals on the Cortex-M3 if you plan of doing assembler.
It is a vector table, not a jump table.
Typically pre-populated with names and weak definitions in startup_stm32f10x.s
So add your code in to a procedure called TIM2_IRQHandler
.section .text.ITM2_IRQHandler,'ax',%progbits
TIM2_IRQHandler:
/* your code */
bx lr�?�?�?�?�?�?