How to set interrupt handler on STM32?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-28 12:31 PM
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?
- Labels:
-
Interrupt
-
STM32F4 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-28 12:35 PM
Just look at the example projects. Every example has a systick handler.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-28 12:37 PM
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)
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-28 1:07 PM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-28 1:20 PM
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 ))
