cancel
Showing results for 
Search instead for 
Did you mean: 

How to set interrupt handler on STM32?

Lucaz
Associate

How do you call an interrupt hanlder as a result of an interrupt (like systick) in the STM32F4xx library? Do you have to change the value in the vector table to point to the handler manually or how is this handled?

4 REPLIES 4
Pavel A.
Evangelist III

Just look at the example projects. Every example has a systick handler.

 

The names in the vector table of startup.s have weak linkage, so when you define an actual function in those names, it will be that which is called. See perhaps stm32f4xx_it.c

ie void USART2_IRQHandler(void)

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Oh okay thank you so much. Where do i find the startup.s file, cant find it? Is it part of the library or does each project have one?

Pavel A.
Evangelist III

In the ST example projects, each project has a separate copy of the .s file. You can use a common (template) file in the "Cube library" if you don't need to change it. Can't find it? train your file searching skills ))